mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Updating rss feed bozo error to use more common wording.g
This commit is contained in:
parent
afa515a8d9
commit
0179beebea
1 changed files with 5 additions and 1 deletions
|
|
@ -772,6 +772,9 @@ class RSSDownloader(Downloader, ABC):
|
|||
pretty_name = 'RSS'
|
||||
listable = False
|
||||
|
||||
def __repr__(self):
|
||||
return '<RSSDownloader>'
|
||||
|
||||
@classmethod
|
||||
def valid_url(cls, url: str) -> Tuple[bool, Optional[dict]]:
|
||||
"""Attempts to parse an RSS Feed. If it succeeds, it returns a FeedParserDict as a dictionary."""
|
||||
|
|
@ -815,7 +818,8 @@ class RSSDownloader(Downloader, ABC):
|
|||
"""
|
||||
Feedparser can report some errors, some we can ignore.
|
||||
"""
|
||||
if 'CharacterEncodingOverride' in str(feed['bozo_exception']):
|
||||
if 'document declared as' in str(feed['bozo_exception']):
|
||||
# Feed's encoding does not match what is declared, this is fine.
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue