Skip to content

Instantly share code, notes, and snippets.

@zongai
Created December 23, 2014 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zongai/c4b6b8c71b4bd7e60839 to your computer and use it in GitHub Desktop.
Save zongai/c4b6b8c71b4bd7e60839 to your computer and use it in GitHub Desktop.
btchat.py
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