mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-02 06:04:56 +01:00
Fix for extended chars in text email imap fetchs on py3.
This commit is contained in:
parent
05411ee451
commit
b9a8a648d9
1 changed files with 3 additions and 2 deletions
|
|
@ -128,9 +128,10 @@ def get_urls_from_html(data,url=None,configuration=None,normalize=False,restrict
|
|||
def get_urls_from_text(data,configuration=None,normalize=False,email=False):
|
||||
urls = collections.OrderedDict()
|
||||
try:
|
||||
data = ensure_str(data)
|
||||
# py3 can have issues with extended chars in txt emails
|
||||
data = ensure_str(data,errors='replace')
|
||||
except UnicodeDecodeError:
|
||||
data=data.decode('utf8') ## for when called outside calibre.
|
||||
data = data.decode('utf8') ## for when called outside calibre.
|
||||
|
||||
if not configuration:
|
||||
configuration = Configuration(["test1.com"],"EPUB",lightweight=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue