geolocation - Read site html from a site in a different geo region -
i using python , beautiful soup read html pages. unfortunately sites redirect geo region (au) can't retrieve target countries version i.e. (uk, us, fr, nz...)
i have tried using vpn service requires me manually change region can't automate process. have tried using python quartz.coregraphics library click options on screen temperamental.
is there way can achieve programmatically?
i have manage nut 1 out myself. best answered example reading uk based site.
import urllib2 url = 'some-uk-url' req = urllib2.request(url) req.add_header('accept-language', 'en-gb') req.add_header('x-forwarded-for', [a uk proxy ipaddress here]) htmltext = urllib2.urlopen(req).read()
Comments
Post a Comment