[GET] FREE, Python Multithreaded Scraper Template (FAST!)

apex1

Regular Member
Joined
May 29, 2015
Messages
217
Reaction score
182
My scraper template is finally done.. and it's an absolute beast.

ALEXA RANK SCRAPER:
  • Takes a list of URLs
  • Uses multiprocessing to iterate through the list and create a process pool
  • Checks server status
  • Scrapes Alexa Rank
  • Error handling
  • Requests timeout
  • Saves output to csv
  • Outputs time it took to complete
  • Barebones / very minimal code
This is to be used as a template. You can modify the code to work for just about anything, and it will be BLAZING FAST thanks to the power of multiprocessing / requests.

This script is 50-100x faster than using the standard Ubot browser. Requests and multiprocessing will tear through thousands of URLs in a very short time. Also, the script is STABLE, it handles all the potential errors and BS.. so it can keep running forever.

Hit me up if you have questions.

https://pastebin.com/AS0PmEUD
 
Also just some side notes, consider putting this on github. Add a requirements.txt to know which version of libs you use and for easy install. A README.md would help to know how to use it. Not required, but it's easier for you to go back in time and check what you've done.
 
My scraper template is finally done.. and it's an absolute beast.

ALEXA RANK SCRAPER:
  • Takes a list of URLs
  • Uses multiprocessing to iterate through the list and create a process pool
  • Checks server status
  • Scrapes Alexa Rank
  • Error handling
  • Requests timeout
  • Saves output to csv
  • Outputs time it took to complete
  • Barebones / very minimal code
This is to be used as a template. You can modify the code to work for just about anything, and it will be BLAZING FAST thanks to the power of multiprocessing / requests.

This script is 50-100x faster than using the standard Ubot browser. Requests and multiprocessing will tear through thousands of URLs in a very short time. Also, the script is STABLE, it handles all the potential errors and BS.. so it can keep running forever.

Hit me up if you have questions.

https://pastebin.com/AS0PmEUD
Removed? Can you reupload it?
 
all right this is dependency you needs
Code:
sudo pip install requests
sudo pip install pandas
sudo pip install BeautifulSoup4
sudo pip install lxml
 
Back
Top