GithubHelp home page GithubHelp logo

scrapy-proxynova's Introduction

scrapy-proxynova

Use scrapy with a list of proxies generated from proxynova.com

The first run will generate the list of proxies from http://proxynova.com and store it in the cache.

It will individually check each proxy to see if they work and remove the ones that timed out or cannot connect to.

Example:

./run_example.sh

To regenerate the proxy list, run: python proxies.py

In settings.py add the following line: DOWNLOADER_MIDDLEWARES = { 'scrapy_proxynova.middleware.HttpProxyMiddleware': 543 }

Options

Set these options in the settings.py.

  • PROXY_SERVER_LIST_CACHE_FILE โ€” a file to store proxies list. Default: proxies.txt.
  • PROXY_BYPASS_PERCENT โ€” probability for a connection to use a direct connection and not use a proxy

scrapy-proxynova's People

Contributors

darthbear avatar svetlyak40wt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scrapy-proxynova's Issues

Track how fast each proxy responds and prefer the faster proxies.

We could track last 10 response times in deque for each proxy. And from time to time resort them according to the average response time.

Selection should use gaussian distrubution, like that:

from random import gauss

proxies = [some list where fastest proxies go first]

index = int(round(gauss(0, len(proxies) / 3.0)))
index = min(index, len(proxies) - 1)

return proxies[index]

Got an error

I got this error while running the example project
Error: Cannot find any available proxies
I tried accessing the proxy page from my browser but proxy nova said that this list is currently offline so i think it's proxynova issue rather than scrapy-proxynova.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.