Some website will ban source ip that has abnormal traffic, so we need change source ip.
- OS X EI Capitan 10.11.6
- tor 0.3.0.9
- python 3.5.2
- pysocks 1.6.7
- stem 1.5.4
tips: brew install tor, pip install pysocks, pip install stem
add below to config file(/usr/local/etc/tor/torrc)
Socks5Proxy 127.0.0.1:1080 # maybe you don't need this in your country.
ControlPort 9051 #default
SocksPort 9050 #default
# use tor --hash-password "123456" to generate the hashcode
HashedControlPassword 16: <your hashcode>notice: change password whatever you like and paste the hashcode after the last colon.
$ brew services start tor
$ python tor.pythat's it, use it, but don't abuse it.
- http://www.learn4master.com/programming-language/python/install-and-use-tor-on-ubuntu-for-python-requests
- https://deshmukhsuraj.wordpress.com/2015/03/08/anonymous-web-scraping-using-python-and-tor/
- https://gist.github.com/jefftriplett/9748036
- https://stackoverflow.com/questions/30286293/make-requests-using-python-over-tor
- https://stackoverflow.com/questions/28252649/stem-cant-get-new-ip-with-python-via-tor
- https://www.atgfw.org/2015/01/linux-tor.html