Skip to content

This package provides an enriched Requests class to use failover rotating proxies.

License

Notifications You must be signed in to change notification settings

fliot/scrapy-ninja-requests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrapy-ninja-requests

This package provides an enriched Requests class to use failover rotating proxies, automatically provided within scrapy.ninja services subscription.

  • rotating proxies
  • proxy assignment optimisation
  • multi thread (synchr=True & syncpool=5)
  • expected http code response control
  • retry-able
from scrapy_ninja_requests import ninja_session

s = ninja_session(key='KJHGFSERTYUIO87654323ERFGHUIO876543', fakeua=True, country="US", retry=3, synchr=True, syncpool=20)

# once loaded, use it as regular requests.Session:

r = s.get('https://your_www_request', accepted_code=[200,301,302])
print(r.text)
# '......'

About

This package provides an enriched Requests class to use failover rotating proxies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages