Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Python Proxy Scraper

A proxy scraping class that maintains a pool of usable proxies collected from 4 sources.

Required Libraries

  • beautifulsoup4
  • requests
  • termcolor

Usage

Initialize a Pool

pool=ProxyPools()
pool.start()

Paramaters when initilizing a new pool

NameTypeUsage
intervalTimeintTime between scraping for proxies in seconds
maxPoolSizeintMaximun number of given proxies in pool at any given time
timeoutint/doubleMax timeout when checking if proxy is valid in seconds
debugboolPrint debug info

Example

pool=ProxyPools(timeout=5,maxPoolSize=10 )
# Initilize a pool with timeout of 5 seconds # and maximum of 10 proxies in pool

Stopping a Pool

pool.kill()

Useful Functions

pool.getOne() #get one proxy from pool which has the lowest response timepool.getList() #get entire list of proxiespool.getSize() #get size of pool

About

Python Proxy Scraping Class

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages