logging improvements
This commit is contained in:
parent
94837624f1
commit
df564a4806
|
@ -9,6 +9,7 @@ with open('bloggers.yml') as f:
|
||||||
users = yaml.safe_load(f.read())
|
users = yaml.safe_load(f.read())
|
||||||
|
|
||||||
def fetch_links(url):
|
def fetch_links(url):
|
||||||
|
print >>sys.stderr, "Looking for feeds in %s" % (url,)
|
||||||
tree = html.fromstring(urllib2.urlopen(url).read())
|
tree = html.fromstring(urllib2.urlopen(url).read())
|
||||||
links = tree.xpath(
|
links = tree.xpath(
|
||||||
'//link[@rel="alternate"][contains(@type, "rss") or ' +
|
'//link[@rel="alternate"][contains(@type, "rss") or ' +
|
||||||
|
|
|
@ -40,8 +40,6 @@ def parse_feeds(weeks, uri):
|
||||||
feedparser.USER_AGENT = "IronBloggerBot/0.1 +http://ironblogger.de/"
|
feedparser.USER_AGENT = "IronBloggerBot/0.1 +http://ironblogger.de/"
|
||||||
feed = feedparser.parse(uri)
|
feed = feedparser.parse(uri)
|
||||||
|
|
||||||
print >>sys.stderr, "Parsing: %s" % uri
|
|
||||||
|
|
||||||
if not feed.entries:
|
if not feed.entries:
|
||||||
print >>sys.stderr, "WARN: no entries for ", uri
|
print >>sys.stderr, "WARN: no entries for ", uri
|
||||||
for post in feed.entries:
|
for post in feed.entries:
|
||||||
|
|
Loading…
Reference in New Issue