X-Git-Url: https://projects.mako.cc/source/iron-blogger/blobdiff_plain/d97eb533020e1dc9fde31d86b6d8bf5a4fc30b9a..1a494bfc66e3ebdd8734acaf1518a7bd1bb1bc8f:/import-feeds.py?ds=inline diff --git a/import-feeds.py b/import-feeds.py old mode 100644 new mode 100755 index fa370c4..9d4f9bb --- a/import-feeds.py +++ b/import-feeds.py @@ -1,3 +1,4 @@ +#!/usr/bin/python from lxml import html import yaml import urllib2 @@ -20,17 +21,14 @@ def fetch_links(url): return links[0].attrib['href'] for (name, u) in users.items(): - print "[%s]" % name for e in u['links']: (title, url) = e[0:2] - print " - %s:" % title.strip() e[0] = e[0].strip() if len(e) == 3: continue link = fetch_links(url) if not link.startswith('http:'): link = urlparse.urljoin(url, link) - print " %s" % (link,) e.append(link) with open('bloggers.yml', 'w') as f: