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