r33int / crunchyrollDownloader

Bash script to download anime videos from Crunchyroll. Powered by youtube-dl.
7 stars 1 forks source link

UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 900: ordinal not in range(256) #9

Open om4r932 opened 3 years ago

om4r932 commented 3 years ago

Hey ,

I don't know why but i got a UnicodeEncode error : Here's the URL of what i wanted : https://www.crunchyroll.com/fr/my-hero-academia/episode-23-shoto-todoroki-origin-733235 And the error code :

[crunchyroll] 733235: Downloading webpage Traceback (most recent call last): File "c:\users\acer\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\acer\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\ACER\AppData\Local\Programs\Python\Python38\Scripts\youtube-dl.exe\__main__.py", line 7, in <module> File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\__init__.py", line 475, in main _real_main(argv) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\__init__.py", line 465, in _real_main retcode = ydl.download(all_urls) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 2068, in download res = self.extract_info( File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 808, in extract_info return self.__extract_info(url, ie, download, extra_info, process) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 836, in __extract_info ie_result = ie.extract(url) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract ie_result = self._real_extract(url) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\crunchyroll.py", line 424, in _real_extract webpage = self._download_webpage( File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\crunchyroll.py", line 277, in _download_webpage return super(CrunchyrollBaseIE, self)._download_webpage(request, *args, **kwargs) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 798, in _download_webpage res = self._download_webpage_handle( File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 667, in _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 634, in _request_webpage return self._downloader.urlopen(url_or_request) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 2288, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "c:\users\acer\appdata\local\programs\python\python38\lib\urllib\request.py", line 525, in open response = self._open(req, data) File "c:\users\acer\appdata\local\programs\python\python38\lib\urllib\request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "c:\users\acer\appdata\local\programs\python\python38\lib\urllib\request.py", line 502, in _call_chain result = func(*args) File "c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\utils.py", line 2579, in http_open return self.do_open(functools.partial( File "c:\users\acer\appdata\local\programs\python\python38\lib\urllib\request.py", line 1354, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "c:\users\acer\appdata\local\programs\python\python38\lib\http\client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "c:\users\acer\appdata\local\programs\python\python38\lib\http\client.py", line 1296, in _send_request self.putheader(hdr, value) File "c:\users\acer\appdata\local\programs\python\python38\lib\http\client.py", line 1228, in putheader values[i] = one_value.encode('latin-1') UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 900: ordinal not in range(256)

I'm on Windows 10 btw and i was able to run it with Git.