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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -