scinfu / SwiftSoup

SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
https://scinfu.github.io/SwiftSoup/
MIT License
4.53k stars 345 forks source link

SwiftSoup mobile version-website html #114

Closed josipvukovic closed 5 years ago

josipvukovic commented 5 years ago

Hi, I'm developing mobile app for local news portal...this is their website ("www.ferata.hr"). I was wondering is there any way to get html from mobile version of this website. When I open it on safari on iPhone it still has the same link but it opens mobile version of website. Reason why I'm doing this is because mobile html has some attributes that normal website doesn't have (number of how many times each article has been open)...thanks! ;)

scinfu commented 5 years ago

Hi, to retrive html from a site you use String(contentsOf: myURL, encoding: .utf8)

Nabil