This forum is in archive mode. You will not be able to post new content.

Author Topic: [Source] pastebinScraper.py  (Read 3408 times)

0 Members and 1 Guest are viewing this topic.

Offline daxda

  • Peasant
  • *
  • Posts: 114
  • Cookies: 112
  • Not the guy you're looking for
    • View Profile
    • Daxda on Github
[Source] pastebinScraper.py
« on: November 05, 2013, 08:53:00 AM »
Just finished another scraper, this time it's for scraping latest created pasties from pastebin.com, Idea taken from joepie91, he's been talking about scraping the site which motivated me coding a script for myself aswell.

The script chooses a random proxy from a defined list, if a connection to the target fails, the proxy will get discarded and when you exit the script the updated proxy list will be saved to file. It connects to pastebin, filters out the latest links to the pasties and fetches the data of those and saves them into files.

Attached to this post is the script with it's dependent files (*.py, Data/Results, Data/Proxies.txt, Data/User-Agents.txt)

As always, this code is free to use and modify, take from it what you want and do with it what you like. Improvements, critique, feedback and so forth are welcome.

Usage:  python pastebinScraper.py [ -s <optional sleep time in seconds here>]

[gist]Daxda/7315302[/gist]
« Last Edit: April 23, 2014, 08:24:39 PM by daxda »

Offline imation

  • Peasant
  • *
  • Posts: 141
  • Cookies: 2
    • View Profile
Re: [Source] pastebinScraper.py
« Reply #1 on: November 05, 2013, 09:54:01 AM »
nice, looks good

Offline d4rkcat

  • Knight
  • **
  • Posts: 287
  • Cookies: 115
  • He who controls the past controls the future. He who controls the present controls the past.
    • View Profile
    • Scripts
Re: [Source] pastebinScraper.py
« Reply #2 on: November 05, 2013, 02:24:59 PM »
I've been waiting for something like this, ace!
I'm gonna have to look over this code.

Many Thanks daxda!
Jabber (OTR required): thed4rkcat@einfachjabber.de    Email (PGP required): thed4rkcat@yandex.com    PGP Key: here and here     Blog

<sofldan> not asking for anyone to hold my hand uber space shuttle door gunner guy.


 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.