-
-
Save florido/868a3b36f7633cdf035a8547730296a9 to your computer and use it in GitHub Desktop.
Downloads torrents from showrss and adds them to transmission; Dependencies: Feedparser and Transmissionrpc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import feedparser | |
import transmissionrpc as tm | |
script_dir = os.path.dirname(__file__) | |
downloaded_file = os.path.join(script_dir, 'showrss.downloaded') | |
base_path = '/media/seagate/Video/Series/' | |
feed_url = 'http://showrss.info/user/448.rss' | |
feed = feedparser.parse(feed_url) | |
for show in feed.entries: | |
info_hash = show['tv_info_hash'] | |
magnetic_link = show['link'] | |
tv_show_name = show['tv_show_name'] | |
with open(downloaded_file, "r+") as downloaded: | |
if info_hash not in downloaded.read().splitlines(): | |
tc = tm.Client('localhost', user='transmission',password='transmission', port=9091) | |
tc.add_torrent(magnetic_link, download_dir=base_path+tv_show_name) | |
downloaded.write(info_hash+'\n\r') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment