I'm trying to access url and then parse it's contents based on tags. My code:
page = requests.get('https://support.apple.com/downloads/') self.tree = html.fromstring(page.content) names = self.tree.xpath("//span[@class='truncate_name']//text()")
Problem: variable page is containing data that of url
I'm new to python 2.7. The whole encoding issues in file. I'm using
unicode-escape as my default encoding. Encoding on resource at
utf-8 whereas encoding of resource at
https://support.apple.com/ is variable. Is this has something to do with the problem? Please suggest solution for this.