change port and fake dates
This commit is contained in:
parent
d86692ebf6
commit
c239a6e227
@ -1,4 +1,5 @@
|
||||
import random
|
||||
from datetime import datetime
|
||||
|
||||
from feedparser import parse
|
||||
|
||||
@ -17,9 +18,13 @@ def parse_single_rss_feed(url, entries, tag_filter):
|
||||
entries[title] = []
|
||||
entrylist = entries[title]
|
||||
entrylist.append(entry.description)
|
||||
entrylist.append(entry.published_parsed)
|
||||
if entry.has_key("published_parsed"):
|
||||
entrylist.append(entry.published_parsed)
|
||||
else:
|
||||
entrylist.append(datetime.now().timetuple())
|
||||
return entries
|
||||
|
||||
|
||||
def contains_category(entry, tag_filter):
|
||||
if not entry.has_key("tags"):
|
||||
return False
|
||||
@ -28,6 +33,7 @@ def contains_category(entry, tag_filter):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def parse_rss_feeds(urls, tag_filter):
|
||||
entries = {}
|
||||
for url in urls:
|
||||
|
Loading…
Reference in New Issue
Block a user