cleanup console logging messages

This commit is contained in:
Nick Sweeting 2018-04-17 03:22:59 -04:00
parent 1ea695d7b7
commit 2cd11feaac
4 changed files with 25 additions and 9 deletions

View file

@ -184,6 +184,10 @@ def parse_pinboard_rss_feed(rss_file):
tags = item.find("{http://purl.org/dc/elements/1.1/}subject").text
title = item.find("{http://purl.org/rss/1.0/}title").text
ts_str = item.find("{http://purl.org/dc/elements/1.1/}date").text
# = 🌈🌈🌈🌈
# = 🌈🌈🌈🌈
# = 🏆🏆🏆🏆
# Pinboard includes a colon in its date stamp timezone offsets, which
# Python can't parse. Remove it:
if ":" == ts_str[-3:-2]:
@ -208,8 +212,8 @@ def parse_medium_rss_feed(rss_file):
root = etree.parse(rss_file).getroot()
items = root.find("channel").findall("item")
for item in items:
for child in item:
print(child.tag, child.text)
# for child in item:
# print(child.tag, child.text)
url = item.find("link").text
title = item.find("title").text
ts_str = item.find("pubDate").text