PDA

View Full Version : Need Help Developing a Check for Change Type Script



enter8
05-22-2013, 10:33 AM
I belong to a private tracker that has the very occasional freeleech torrent. If you get in on the swarm shortly after the torrent is uploaded, you can, to an extent, ratio build successfully, but if too much time passes, it's not that viable. I've been checking for new freeleech torrents throughout the day, and, if one shows up, I load it, but, checking all the time is getting old and I'm not getting into the swarm fast enough, so I'd like to automate something.

The site has RSS links for all content, but, unfortunately, the freeleech signifier doesn't show up in the RSS. The only place I get the signifier is in the page source of the 'browse' page.

I need a script that will, every 15 or so minutes, load the browse page, look at the page source, extract the necessary information for any new freeleech torrents and use the associated download link to save the torrent file into my autodownload folder.

The page source gives me everything I need quite clearly. I'm thinking I could parse the information for each freeleech torrent (name, download link), and output it to a csv delimited file which I could then use to compare old freeleech entries vs. new (it's rare, but sometimes two freeleech torrents will show up on the browse page at the same time, and sometimes even one after the other). That part doesn't really worry me too much.

Where I really need help is with the broad strokes, such as my choice of scripting language. I do a lot of work with autohotkey/autoit, a windows scripting language, but doing this with autohotkey would be incredibly complex and awkward, and, I'd like, if possible, to do this in the most elegant and concise fashion possible. I think this might be a good job for greasemonkey, but it's been so long since I've worked with greasemonkey that I've forgotten how to use it.

How would you approach this? Is there any kind of script that comes close to achieving this that I could tweak to suit my needs? Any help would be appreciated.

Ck1
07-31-2013, 12:23 PM
U obvious want improve instant peak bandwidth ..I dont think because ppl use utube xbixlive say

hogfish
08-02-2013, 01:26 PM
I'd write a Python or Ruby script to do it, though you'd have to send the authentication cookies stored in your browser so that you can access the site when it's logged in as you. That should be trivial to do, though. After that, you can parse the HTML either into a DOM and query it using those methods or XPath, or you could just string search it via regular expressions.