Add sgmllib 3k port so feedparser can fix relative urls

This commit is contained in:
Kyle Mahan 2015-08-22 09:50:15 -07:00
parent 5e657e9807
commit d179c1bd03
2 changed files with 4 additions and 2 deletions

View file

@ -32,3 +32,4 @@ rq==0.5.2
six==1.9.0
uWSGI==2.0.10
websockets==2.4
sgmllib3k==1.0.0

View file

@ -299,8 +299,9 @@ def is_content_equal(e1, e2):
def process_xml_feed_for_new_entries(feed, content, backfill, now):
current_app.logger.debug('fetching xml feed: %s', feed)
parsed = feedparser.parse(content)
parsed = feedparser.parse(content, response_headers={
'content-location': feed.feed,
})
feed_props = parsed.get('feed', {})
default_author_url = feed_props.get('author_detail', {}).get('href')
default_author_name = feed_props.get('author_detail', {}).get('name')