简体   繁体   中英

How can I set a country limit in my proxy?

I do webscrapring with Scrapy, using Polipo as proxy, and Tor as network. I know my proxy makes rotating IP, but the IP location is most of the time out of my country. On the websites I scrape, it could have some blocking considering the location of the IP. Then, how can I keep the rotating IP rule and to limit the location of the IP used?

Scrapy version: 1.5.0, Python version: 2.7.9, Tor version: 0.3.4.8, Vidalia: 0.2.21

Most probably you know this but the final ip which the website you are scraping it will see the ip of the exit node. As such you can control the country of the exit node using configuration

You can run multiple tor set up and mix and match or rotate tor service across your request set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM