mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
Merge branch 'master' into dejal
This commit is contained in:
commit
b0876789c6
1 changed files with 4 additions and 3 deletions
|
@ -44,7 +44,7 @@ class FeedFinder(object):
|
|||
logging.warn("Error while getting '{0}'".format(url))
|
||||
logging.warn("{0}".format(e))
|
||||
return None
|
||||
if not skip_user_agent and r.status_code == 403:
|
||||
if not skip_user_agent and r.status_code in [403, 204]:
|
||||
return self.get_feed(url, skip_user_agent=True)
|
||||
return r.text
|
||||
|
||||
|
@ -133,8 +133,9 @@ def find_feeds(url, check_all=False, user_agent=None):
|
|||
return sort_urls(urls)
|
||||
|
||||
# Guessing potential URLs.
|
||||
fns = ["atom.xml", "index.atom", "index.rdf", "rss.xml", "index.xml", "index.rss", "index.json"]
|
||||
urls += list(filter(finder.is_feed, [urlparse.urljoin(url, f) for f in fns]))
|
||||
if not any(ignored_domain in url for ignored_domain in ["openrss", "feedburner"]):
|
||||
fns = ["atom.xml", "index.atom", "index.rdf", "rss.xml", "index.xml", "index.rss", "index.json"]
|
||||
urls += list(filter(finder.is_feed, [urlparse.urljoin(url, f) for f in fns]))
|
||||
return sort_urls(urls)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue