Created
December 23, 2014 12:17
-
-
Save zongai/c4b6b8c71b4bd7e60839 to your computer and use it in GitHub Desktop.
btchat.py
This file contains 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 feedparser | |
def get_btchat_list(): | |
items = feedparser.parse("http://rss.bt-chat.com/?group=3") | |
showlist = ['Mulaney','Major.Crimes'] | |
entries = [] | |
for item in items['entries']: | |
entrie = {} | |
entrie['title'] = item['filename'] | |
entrie['magneturi'] = item['magneturi'] | |
for show in showlist: | |
if show in entrie['title']: | |
entries.append(entrie) | |
return entries | |
if __name__ == '__main__': | |
print get_btchat_list() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment