Browse Source

change port and fake dates

main
crunk 1 year ago
parent
commit
c239a6e227
  1. 6
      parse_rss_feeds.py
  2. 2
      start.py

6
parse_rss_feeds.py

@ -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)
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:

2
start.py

@ -32,4 +32,4 @@ def load_json_file():
if __name__ == "__main__":
APP.debug = True
APP.run(port=5000)
APP.run(port=8080)

Loading…
Cancel
Save