Autodl-irssi
From Bytesized Wiki
Autodl-irssi is irssi autodownload script. It currently supports many trackers and is being actively developed. For more information visit project autodl-irssi home page.
Contents |
Requrements
autodl-irssi has the following Perl module dependencies:
- Archive::Zip
- Net::SSLeay
- HTML::Entities
- XML::LibXML
- Digest::SHA1
- JSON
- JSON::XS (optional)
All dependencies are installed on Bytesized slices.
Installation
Log into your VNC or SSH in your slice. If you are in VNC, open up the lxterminal.
Type:
mkdir -p ~/.irssi/scripts/autorun
this will create a directory which irssi will scan once it starts. Navigate inside the scripts directory:
cd ~/.irssi/scripts
and download the autodl-irssi files:
wget -O autodl-irssi.zip http://update.autodl-community.com/autodl-irssi-community.zip
Once downloaded we need to extract its content:
unzip -o autodl-irssi.zip
We can remove downloaded .zip file:
rm autodl-irssi.zip
Now we need to copy autodl-irssi script inside of autorun directory in order for irssi to start it up automatically:
cp autodl-irssi.pl autorun/
Next, we need to create a place in which autodl config file will be stored:
mkdir -p ~/.autodl
and finally, create a config file:
touch ~/.autodl/autodl.cfg
So far pretty much everything is clear and all steps so far can be found on autodl-irssi project page http://sourceforge.net/projects/autodl-irssi/
Network setup and filters
Since we cannot possibly cover all sites supported by autodl-irssi(nor I am a member of all of them), we will cover basic setup and filters. If you setup and use a tracker that is not shown in this wiki page and you want to share your setup with others, contact Max/maxlazio
Navigate to the home folder:
cd
and open up autodl.cfg:
nano ~/.autodl/autodl.cfg
autodl.cfg must contain the following
[options] max-saved-releases = 1000 #autodl-irssi will remember the last max-saved-releases releases you have downloaded so it won't re-download the same file again save-download-history = true download-duplicates = false #By default, it's false so no duplicate releases are downloaded. Set it to true if you want to download the same release again if it's re-announced. upload-type = watchdir #Save torrent to a watch directory upload-watch-dir = /home/hd3/max/torrents/watch #watch directory on your box EDIT THIS LINE with your watch dir path
These are the basic options of autodl-irssi. If you want your autodownload script to automatically connect to IRC announce channel of your tracker, we will need to define a server(s). Hit CTRL+x and enter after editing.
Examples
All examples written below must be added to autodl.cfg, they do not exist anywhere until you write them. Just follow the examples, paste the codes and edit them to your needs.
BTN
Example1 is irc.broadcasthe.net network, home of BTN
You need to have a registered username on the IRC network. Join the network and register it by typing
/msg Nickserv register <password> <email>
(substitute <password> with your password and <email> with your email)
Now go back to ssh, open the file we created earlier, autodl.cfg, via nano (text editor):
nano ~/.autodl/autodl.cfg
Copy this part into it, and fill in the data:
[server irc.broadcasthe.net] port = 6667 nick = username #EDIT THIS LINE ident-password = <password> #EDIT THIS LINE ident-email = <email> #EDIT THIS LINE
In order to get into BTN announce channel, we must do the following things, just once:
1. Visit BTN website, click "Edit" to edit profile, then click IRC. now you need to choose the channel #BTN-Announce from the list.
2. Still on the same page, you will see IRC KEY bellow, and a under that, is the text you need to copy:
Use: /msg CableGuy IDENTIFY your.user.name XXXXXXXXXXXXXXXXXXXXX
Go back to your IRC client, connect to the BTN server, and paste the line into the server window, starting from the "/" symbol. (make sure that instead of XXXXX, you have a real code made of numbers and digits.) press Enter.
3. If you didn't make any mistakes by now, you should have automatically joined the announce channel
You have finished authenticating to CableGuy, and will never need to repeat this step.
4. Back to Autodl-Irssi config file, copy the following text into the file:
[channel irc.broadcasthe.net] name = #btn-announce
In order to get authkey and torrent_pass which are necessary to download a torrent, go to any torrent on BTN and copy DL link. It will be in the form of
http://broadcasthe.net/torrents.php?action=download&id=1212122&adfsasfs2233223asfff2r423&torrent_pass=safsasffas2422dsfaasf32432
From this link, you need to find two things, your torrent_pass. and your authkey: 1. finding torrent_pass is easy, it's at the end of the link, just copy the text after "torrent_pass=" 2. to get your authkey, copy the text after "download&id=1212122&", and before the next "&" symbol. (so in the example above, you would copy the text starting with "adfsasfs2233"... etc, up until the next & symbol.
then, simply fill in the data in your config file:
[tracker btn] authkey=adfsasfs2233223asfff2r423 #EDIT THIS LINE torrent_pass=safsasffas2422dsfaasf32432 #EDIT THIS LINE upload-delay-secs= 0 enabled= true
Now, finally, the filters. This is an example from autodl-irssi forum. You can of course edit it to fit your needs
# TV-shows/movies template: (note that wildcards aren't necessary in the shows filter option!) [filter TV] shows = The Simpsons, American Dad, Modern Family max-size = 2GB #seasons = 3-8 #episodes = 0-99 resolutions = SD, 720p #sources = HDTV, DVDRip, BluRay encoders = xvid, x264 #years = 2008-2012, 1950 match-sites = btn
Note that you have to have the lines which are not commented(they don't have #in front) or files won't get downloaded.
What.CD
Example2 is WhatNetwork, home of what.cd. Copy this into your config, and edit it with your info (make sure to delete the "#explanation") and now fill in the data
[server irc.what-network.net] port = 6667 nick = username #username on that irc network(must be registered at that network) ident-password = <password> #Nickserv password ident-email = <email> #Nickserv email
In order to get into what.cd announce channel, irssi must auth with Drone
[channel irc.what-network.net] name = #what.cd-announce invite-command = /msg Drone enter #what.cd-announce username IRCKEY #irckey is located at your what.cd user profile
In order to get authkey and torrent_pass which are necessary to download a torrent, go to any torrent on What.cd and copy DL link. It will be in the form of
https://ssl.what.cd/torrents.php?action=download&id=2121212121&authkey=adfsasfs2233223asfff2r423&torrent_pass=safsasffas2422dsfaasf32432
and then just fill the data:
[tracker what] authkey=adfsasfs2233223asfff2r423 torrent_pass=safsasffas2422dsfaasf32432 upload-delay-secs= 0 enabled= true
Finally, the filters. This is an example from autodl-irssi forum. You can of course edit it to fit your needs:
[filter MUSIC_mp3] match-sites = what min-size = 30MB max-size = 1GB years = 2011 #shows = ArtistOrGroup #1, ArtistOrGroup #2, etc #albums = Album #1, Album #2, etc formats = MP3 bitrates = V0 (VBR) media = CD #tags = hip hop, tag #2, tag #3 #tags-any = true #except-tags = hip hop, tag #2, tag #3 #except-tags-any = false #scene = #log = #cue =
Note that you have to have the lines which are not commented(they don't have #in front) or files won't get downloaded.
IPT
Example 4 is irc.iptorrents.com network. Following thigs are needed in autodl.cfg:
[server irc.iptorrents.com] port = 6667 nick = Nickname #EDIT THIS LINE ident-password = password #EDIT THIS LINE ident-email = [email protected]
Use username similar to your account username, I usually append bot to the existing username. Do not use y8our account password, make up a new one.
[channel irc.iptorrents.com] name = #ipt.announce
For IPT you will need to get your passkey from your profile. Click your username under the IPT banner, and then copy the Passkey code. next paste the code in the config file like so:
[tracker ipt] passkey=32jl50st092j3ls09j2lnf9 #'''EDIT THIS LINE''' upload-delay-secs = 27 #copy this line too, is good to set some delay, otherwise we may get "unregistered torrents" enabled = true
Now, finally, the filters. This is an example from autodl-irssi forum. You can of course edit it to fit your needs
#TV-shows/movies template: (note that wildcards aren't necessary in the shows filter option!) [filter TV] match-releases = The?Simpsons8, American?Dad*, Modern?Family* max-size = 2GB resolutions = SD, 720p sources = HDTV encoders = xvid, x264 match-sites = ipt
Here's another example, this one is a filter to grab Freeleech, up to 20GB size, and up to one per hour.
[filter itp-Freeleech!] match-sites = ipt freeleech = true max-size = 20GB max-downloads = 1 max-downloads-per = hour
TL
Use username similar to your account username, I usually append bot to the existing username. Do not use your account password, make up a new one. ok, now copy to your config and edit this text:
[server irc.torrentleech.org] port = 7011 nick = YourNick_autodl #EDIT THIS LINE with a nickname for the bot. ident-email = [email protected] #EDIT THIS LINE, with an email to register the bot's nickname ident-password = 123passlol #EDIT THIS LINE, with a password to register the bot's nickname [channel irc.torrentleech.org] name = #tlannounces
For TL you will need to get your passkey from your profile. Click your username under the TL banner, and then click "Edit Profile". find your RSS link below, and copy the passkey at the end of the link, (after the last "/"). . next paste the code in the config file like so:
[tracker tl] rsskey= ji1p2f23ijlb32j3 #EDIT THIS LINE with your passkey upload-delay-secs = 27 #copy this line too, is good to set some delay, otherwise we may get "unregistered torrents"
Now, finally, the filters. This is an example. You can of course edit it to fit your needs ( note: the "#" symbol means autodl will ignore the rest of that line)
[filter TL-movie1] min-size = 1GB max-size = 4GB match-sites = tl encoders = x264, xvid sources = BDRip, BRRip, HDRip, Web #resolutions = 720p, 1080p years = 2013 max-downloads = 1 max-downloads-per = hour except-releases = *D3Si
PTP
Use username similar to your account username, I usually append bot to the existing username. Do not use your account password, make up a new one. ok, now copy to your config and edit this text:
[server irc.passthepopcorn.me] port = 6667 nick = YourNick #EDIT THIS LINE with a nickname for the bot (use your EXACT same nickname as on PTP) ident-email = [email protected] #EDIT THIS LINE, with an email to register the bot's nick. ident-password = 123passlol #EDIT THIS LINE, with a password to register the bot's nickname [channel irc.passthepopcorn.me] name = #ptp-announce invite-command = /msg Hummingbird ENTER <username> <password> #ptp-announce
(edit the "invite-command" with your own invite command, which can be found on your profile at ptp website.)
Next, For PTP you need to find out your authkey and torrent_pass, both are found in the download link of any torrent. so find yours , then edit in autodl config;
[tracker ptp] authkey = 234234134j432j4j32j43 #EDIT THIS LINE with your correct authkey torrent_pass = 54354i4ui4u5i4dsfsdfsfd78dsf #EDIT THIS LINE with your torrent_pass upload-delay-secs = 11
Now, finally, the filters. This is an example to grab some Freeleech. You can of course edit it to fit your needs.
[filter ptp-Freeleech!] match-sites = ptp freeleech = true min-size = 800MB max-size = 4GB max-downloads = 1 max-downloads-per = hour
More info on autodl.cfg file can be found here
Starting the downloader
After the setup is finished, only thing left to do is to startup irssi: run this command in terminal:
screen -S irssi irssi
this will startup irssi.
And now, if everything is setup correctly autodl will start connecting to all networks and announce channels. (you can press CTRL+N repeatedly to switch between open windows inside Irssi)
Now if we wish to close the SSH window, while keeping Irssi working, we need to detach from screen with CTRL+A, D ( hold CTRL and A together then lift keys, and press D)
Next time we want to resume the Irssi screen from the background, we just run in SSH the command:
screen -r irssi
(more info on screen\irssi are found in the wiki)