jamesband Posted August 18, 2006 Share Posted August 18, 2006 So, I was having a problem a couple of years ago. My wife and kids had taken over the Tivo and I was not always able to get my shows. So, I started looking online. I found what I wanted in Torrent sites. This was great, I could get my shows when they had been forced off the Tivo's schedule. I found myself using it more and more, as my shows were more and more giving way to the others. So, like a good little script kitty, I wrote a script. The first script worked well but, not using regular expressions, it didn't have the flexibility that I really felt it needed. So, after a couple of months I totally rewrote it using regular expressions and XML objects! I have been using it for quite a while and it has performed well. If you decide to use it, just remember - GIGO. The quality of the results is totally dependent on the quality of the torrent site and the quality of the expression used to search it.SOURCE INCLUDED, NO EXECUTABLES -- Zipped because I can't upload INI file.Download it, play with it, tweak it, enjoy it! -- a 'Torrents' folder is req'd in the same folder as the script, as this is where the torrent files are placed.This script gets the torrent (tracker) file, it does not interface with any torrent manager/downloader!This script is for educational purposes only. This script can be used as an example of XML and Regular Expressions in AutoIT.Lotsa luv to the folks in the forum here, I learned all the basics here! I may have even theived snippets! (if i didn't give you props... I am really sorry!)PS - There are keys in the ini that are not used, at one time I had planned to pull in episode info, but I abandonded it when I changed from myHTPC to MediaPortal. MediaPortal doesn't make it easy to add episode info.MiniNova___Object.zip Link to comment Share on other sites More sharing options...
jamesband Posted August 20, 2006 Author Share Posted August 20, 2006 Plenty of downloads... No comments? No questions? No mods to the script? All are welcome... Link to comment Share on other sites More sharing options...
Skrip Posted August 20, 2006 Share Posted August 20, 2006 What's a torrent? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Paulie Posted August 20, 2006 Share Posted August 20, 2006 What's a torrent?A .torrent file is used in peer-to-peer technology, specifically in a BitTorrent client program. A .torrent file is used to download other files. Link to comment Share on other sites More sharing options...
NELyon Posted August 20, 2006 Share Posted August 20, 2006 hmm... it creates the torrent directory, then a text file saying it aborted the download Link to comment Share on other sites More sharing options...
jamesband Posted August 20, 2006 Author Share Posted August 20, 2006 hmm... it creates the torrent directory, then a text file saying it aborted the downloadpls post the log file and I'll take a look. Link to comment Share on other sites More sharing options...
NELyon Posted August 20, 2006 Share Posted August 20, 2006 2006-08-19 -- ABORT - Download aborted... received 0 bytes in 2008.64856701126 seconds It only waited about 3 seconds though Link to comment Share on other sites More sharing options...
jamesband Posted August 20, 2006 Author Share Posted August 20, 2006 (edited) 2006-08-19 -- ABORT - Download aborted... received 0 bytes in 2008.64856701126 seconds It only waited about 3 seconds though hmmm.... Which version of AutoIt you sporting? (I realize I didn't post this, but I am using the latest beta.) Also, pop the link below into your Internet Explorer and see if you get a screen full of XML: http://www.mininova.org/rss.xml?cat=8&num=99 --------------------- I had a quick look at the code and it is not using any includes outside those that come with the beta... er... I think. Edited August 20, 2006 by jamesband Link to comment Share on other sites More sharing options...
NELyon Posted August 20, 2006 Share Posted August 20, 2006 (edited) It dl's the xml file too, but the torrent directory stays blank EDIT: 3.2.0.1 Edited August 20, 2006 by codemyster Link to comment Share on other sites More sharing options...
jamesband Posted August 20, 2006 Author Share Posted August 20, 2006 (edited) It dl's the xml file too, but the torrent directory stays blankEDIT: 3.2.0.1Yeah... Change line #54 from sleep(2000) to sleep(10000)This while/wend loop monitors the download of the rss file so that if there is no headway, it exits the script.The above edit changes the wait time from 2 secs to 10 secs, you can play with it and see what happens.Something important to note: It will not always download torrent files, as newer episodes are not always available. To test, you need to change episode info in the ini file for an entry that you know is in the rss file. (However, there apparently is a new episode of SG Atlantis available at the moment.) Edited August 20, 2006 by jamesband Link to comment Share on other sites More sharing options...
jamesband Posted August 25, 2006 Author Share Posted August 25, 2006 If any of you make updates to the code, I'd love to see it! Link to comment Share on other sites More sharing options...
vim Posted August 25, 2006 Share Posted August 25, 2006 (edited) Yeah... Change line #54 from sleep(2000) to sleep(10000) This while/wend loop monitors the download of the rss file so that if there is no headway, it exits the script. The above edit changes the wait time from 2 secs to 10 secs, you can play with it and see what happens. Something important to note: It will not always download torrent files, as newer episodes are not always available. To test, you need to change episode info in the ini file for an entry that you know is in the rss file. (However, there apparently is a new episode of SG Atlantis available at the moment.) I changed it. I get this error: 2006-08-25 -- ABORT - Download aborted... received 0 bytes in 9987.75311896945 seconds Okay, changed line5 again, now get this: 2006-08-25 -- Big Brother - 7x22 -- Big Brother US S07E22 PDTV XviD-FQM [eztv] Fri, 25 Aug 2006 06:37:11 +0200 Should I just keep increasing the time? ViM Edited August 25, 2006 by vim Link to comment Share on other sites More sharing options...
jamesband Posted August 25, 2006 Author Share Posted August 25, 2006 I changed it. I get this error: 2006-08-25 -- ABORT - Download aborted... received 0 bytes in 9987.75311896945 seconds Okay, changed line5 again, now get this: 2006-08-25 -- Big Brother - 7x22 -- Big Brother US S07E22 PDTV XviD-FQM [eztv] Fri, 25 Aug 2006 06:37:11 +0200 Should I just keep increasing the time? ViM nope... this means that it got the RSS file and successfully parsed it. It found the Big Brother Ep you reported. so, this being said... you should check the torrents folder, there should be one in there. you oughtta know what to do with that. You need to edit the ini file and for your preferences. Link to comment Share on other sites More sharing options...
jamesband Posted October 3, 2006 Author Share Posted October 3, 2006 well... i have been having problems with the script on and off at times... there is not much I can do about the downloading... if the rss feed doesn't download, there is nothing that can be done. however, I get xml related errors and they come in huge blocks... it seems that there are often illegal chars in the <description>...</description> nodes, so I added some code to simply remove the nodes, since the script doesn't use the info. the verifyrss() function now looks like this: Func verifyrss($rssfn) $rsslen = filegetsize($rssfn) $rssdata = fileread($rssfn, $rsslen) if (stringinstr($rssdata, "<rss") = 1 and stringinstr($rssdata, "</rss>") > 1) then ; good rss grab ; remove the descriptions, as they often contain illegal chars $rssdata = StringRegExpReplace($rssdata, "<description>.*?</description>", "<description />") ;save the modified rss back to the file FileWrite($rssfn, $rssdata) return 0 else ; bad rss grab return 1 endif EndFunc Link to comment Share on other sites More sharing options...
jamesband Posted April 24, 2007 Author Share Posted April 24, 2007 Anyone still using this script? Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 24, 2007 Share Posted April 24, 2007 I just saw this and thought I should add a quick comment. i used to use torrent files alot before I got a warning from my ISP for using them... [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
Dolemite50 Posted April 24, 2007 Share Posted April 24, 2007 I just saw this and thought I should add a quick comment. i used to use torrent files alot before I got a warning from my ISP for using them...That's pretty surprising. What privacy-invading ISP was this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now