A shitty AutoDL-like bot.
Go to file
2018-05-18 08:53:02 -04:00
.gitignore first commit 2018-05-09 15:59:14 -04:00
oppaiBot.py Merge branch 'logictags' 2018-05-18 08:44:37 -04:00
README.md finish merging readme 2018-05-18 08:53:02 -04:00

OppaiBot

It sits in a torrent tracker's IRC announce channel and downloads any new torrent matching it's filters and saves them to a directory. This is a really lazy bot and has all of about <1 hour of work put into it.

This bot was designed with Oppaitime in mind (hence the name) but it's general enough that it should work with any tracker. Because I'm too lazy to make it login to the tracker site properly, it requires you to extract your session cookie for the site into a text file. How you do that is up to you.

Supports connecting to multiple tracker IRC servers at once. Simply make separate config sections for each tracker and it will just werk.

Requirements

Python 3+
Python modules: requests, twisted

Config

server - The address of the IRC server the bot should connect to.
port - The server port the bot should use. SSL probably won't work and isn't recommended.
nickname - The nickname the bot will use to initially connect to the server with. It's not actually important since the tracker's bot will (usually sometimes) rename you upon authentication.
ident - The IRC username (aka ident) the bot uses to connect to the server. This usually isn't important.
tracker_bot - The name of the tracker's IRC bot to authenticate with.
auth_msg - The message to send to the tracker_bot to authenticate with and access the announce channel. It's up to you figure this out.
watch_dir - The directory to save torrents to.
cookies_txt - The path to where your session cookie(s) are stored. Should be in Netscape format.
tags - Comma-delineated list of tags to look for in each announce message. The script is just performing simple string comparisons on the entire message, so the 'tag' can be any substring appearing in the announce message. Tag inside of brackets are AND'd together, tag groups are then OR'd together. Tags starting with ! are treated as NOT [tag]. In the example below, announce messages with ['English' AND NOT 'Manga'] OR ['Manga' AND 'English' AND 'Archived'] OR 'Dual Language' OR 'Softsubs' will be matched.
blacklist - Comma-delineated list of blacklisted tags. Same as tags, except if any of these are found in the announce message the bot skips the entire message. This parameter is optional.

Example config.cfg

[oppaitime]
server = irc.oppaiti.me
port = 6667
nickname = iou1name
ident = OppaiBot
tracker_bot = Udon
auth_msg = BOT #oppaitime-announce iou1name SpaghettiIsAFaggot
watch_dir = /home/iou1name/torrent/oppaitime/Watch/
cookies_txt = cookies.txt
tags = [English,!Manga],[Manga,English,Archived],[Dual Language],[Softsubs]
blacklist = Loose

[redacted]
server = irc.scratch-network.net
port = 6667
nickname = iou1name|bot
ident = OppaiBot
tracker_bot = Drone
auth_msg = enter #red-announce iou1name TheyllAlwaysBePTHToMe
watch_dir = /home/iou1name/torrent/passtheheadphones/Watch/
cookies_txt = cookies.txt
tags = [rock]