mps-youtube / pafy

Python library to download YouTube content and retrieve metadata
1.39k stars 313 forks source link

Unicode error #163

Open ghost opened 7 years ago

ghost commented 7 years ago

https://www.youtube.com/watch?v=8mSskFS0vn4 : Pafy creates a filename containing the letter 'ü' which throws an Unicode error when remuxing.

Temporary fix: unidecode the generated filename. Patch line 461 of backend_shared.py to return unidecode(filename)

ids1024 commented 7 years ago

What is the exact error message? Is this with python 2 or python 3? What locale is your system using? (You can determine that with the locale command.)

ghost commented 7 years ago

Sorry, with python 2.7 on Windows 10 en-US. 'ascii' codec can't encode character u'\xe9' in position 62: ordinal not in range(128)

ids1024 commented 7 years ago

Does 7b87b027dfe197761d477d8803d7144daf007762 fix this?

ghost commented 7 years ago

Didn't test but seems good, yea