Bugfix: UnicodeDecodeError: 'utf-8' codec can't decode byte

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2019-12-19 18:57:31 +01:00
parent ca82200665
commit caa72df379

View file

@ -40,7 +40,7 @@ class URL:
""" """
try: try:
f = self.http.request('GET', self.link) f = self.http.request('GET', self.link)
return f.data.decode("utf-8") return f.data.decode("utf-8", "ignore")
except urllib3.exceptions.NewConnectionError: except urllib3.exceptions.NewConnectionError:
print("\n{0}Can't read the file '{1}'{2}".format( print("\n{0}Can't read the file '{1}'{2}".format(
self.meta.color["RED"], self.link.split("/")[-1], self.meta.color["RED"], self.link.split("/")[-1],