yasoob / watchcartoononline-dl

It is a cartoon downloader made in python. Just run this script and type in the url of the cartoons which you want to download from http://www.watchcartoononline.com/
The Unlicense
20 stars 10 forks source link

Trouble downloading occasionally? #18

Closed bearachute closed 6 years ago

bearachute commented 6 years ago

Occasionally I get errors about not being able to decode utf-8, it especially happens to me on Bob's Burger episodes for whatever reason.

Here's the output Traceback (most recent call last): File "watch-dl.py", line 180, in episodes_extractor(sys.argv[1]) File "watch-dl.py", line 88, in episodes_extractor doAnEpisode(url) File "watch-dl.py", line 172, in doAnEpisode downloader(final_url, name) File "watch-dl.py", line 95, in downloader u = urlopen(fileurl) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 223, in urlopen return opener.open(url, data, timeout) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 526, in open response = self._open(req, data) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 544, in _open '_open', req) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 504, in _call_chain result = func(*args) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1250, in _send_request self.putrequest(method, url, **skips) File "C:\Users\PC1\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1117, in putrequest self._output(request.encode('ascii')) UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 39: ordinal not in range(128

do you know anything about this at all?