All I do is simply:
let html = try String(contentsOf: hereMyUrl)
but the content of html is not the same as it displayed with a browser. Why? I cannot find some tags with specific attributes. I suppose it is loaded later with js. But how to accomplish that with Swift?
However when I try to it with WKWebView:
let wk = WKWebView()
let request = URLRequest(url: URL(string: hereMyUrl)!)
wk.load(request)
wk.evaluateJavaScript("document.documentElement.outerHTML.toString()") { html, error in
print("++++++===")
print(html)
print("++++++===")
}
I get nil
there. Why?