Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle FeedParser's peculiar handing of RSS 1.0 feeds

  • Loading branch information...
commit cf8144b85e1c3f8e7213c5a0ae0a027bd5a1abf1 1 parent b31973d
Sam Ruby authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 planet/reconstitute.py
  2. +1 −1  spider.py
View
5 planet/reconstitute.py
@@ -86,10 +86,11 @@ def links(xentry, entry):
if not entry.has_key('links'): return
xdoc = xentry.ownerDocument
for link in entry.links:
+ if not 'href' in link.keys(): continue
xlink = xdoc.createElement('link')
- xlink.setAttribute('type', link.type)
+ xlink.setAttribute('type', link.get('type',None))
xlink.setAttribute('href', link.href)
- xlink.setAttribute('rel', link.rel)
+ xlink.setAttribute('rel', link.get('rel',None))
xentry.appendChild(xlink)
def date(xentry, name, parsed):
View
2  spider.py
@@ -10,7 +10,7 @@
if len(sys.argv) == 2:
# spider all feeds
spider.spiderPlanet(sys.argv[1])
- elif len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
+ elif len(sys.argv) > 2:
# spider selected feeds
config.load(sys.argv[1])
for feed in sys.argv[2:]:
Please sign in to comment.
Something went wrong with that request. Please try again.