forked from cvibhagool/scrapy-tor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20b0603
commit 00bcebd
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# scrapy-tor | ||
This is a scrapy project skeleton with Tor integration | ||
|
||
# How to get started | ||
Beacuse scrapy does not work with SOCKS proxy, you'll need to set up a web proxy server that relays requests to Tor. | ||
You can install [Polipo](http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/), a lightweight web proxy. Then point Polipo to Tor's listening port, which is 9050 by default. | ||
|
||
Uncomment or add the following lines to Polipo's config file `etc/polipo/config` to set up Polipo. | ||
``` | ||
socksParentProxy = localhost:9050 | ||
disableLocalInterface=true | ||
diskCacheRoot = "" | ||
``` | ||
The function `ProxyMiddleware` defined in `middlewares.py` will relay all scrapy's requests to Polipo's default port of 8123 | ||
|
||
Don't forget to start Polipo and Tor before scraping! |