Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji in title breaks the download #25868

Open
someziggyman opened this issue Jul 1, 2020 · 0 comments
Open

Emoji in title breaks the download #25868

someziggyman opened this issue Jul 1, 2020 · 0 comments

Comments

@someziggyman
Copy link

@someziggyman someziggyman commented Jul 1, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.06.16.1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

youtube-dl -v https://www.youtube.com/watch?v=AmQlEcuJrFw&t=77s
[1] 20532
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=AmQlEcuJrFw']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 2.7.16 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] AmQlEcuJrFw: Downloading webpage
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on u'https://r1---sn-bpb5oxu-3c2k.googlevideo.com/videoplayback?expire=1593657620&ei=tPT8XrDVObmAv_IP74yFyA4&ip=193.0.220.188&id=o-AERCJljBUW3YsMbrmXtqowSUMx8LlOYpS83GLrOhaOxk&itag=22&source=youtube&requiressl=yes&mh=49&mm=31%2C29&mn=sn-bpb5oxu-3c2k%2Csn-3c27sn7z&ms=au%2Crdu&mv=m&mvi=0&pl=23&nh=%2CIgpwcjAxLmticDAxKgkxMjcuMC4wLjE&initcwndbps=1018750&vprv=1&mime=video%2Fmp4&ratebypass=yes&dur=1947.875&lmt=1557512646549191&mt=1593635908&fvip=18&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgTsOXxHdrNWEIVSJhK96HrBaQbCiFJqdzxpO5LXDypK8CIQC_1GoRRi-bAyuimgzJXNqtseBExaiHS1VGwseecjTNcw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cnh%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJ8vNK7I7XUqpemNc2jMtP_BOGnFCDV9N3VhvHlgJEOhAiEAi6FTFGEA_32DJBJG0xQmlz6PUFXizIR8-hkuhEUccqA%3D'
ERROR: unable to open for writing: [Errno 92] Illegal byte sequence: "\xf0\x9f\xaa\x90D\xc3\xa9couvrir des Extra-Terrestres serait une tr\xc3\xa8s mauvaise nouvelle (l'Esprit Sorcier) - ASTRONOGEEK-AmQlEcuJrFw.mp4.part"
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 250, in download
    ctx.tmpfilename, ctx.open_mode)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 2054, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 92] Illegal byte sequence: "\xf0\x9f\xaa\x90D\xc3\xa9couvrir des Extra-Terrestres serait une tr\xc3\xa8s mauvaise nouvelle (l'Esprit Sorcier) - ASTRONOGEEK-AmQlEcuJrFw.mp4.part"

Description

Looks like that emoji in the title makes the download fail. --restrict-filenames solved the problem, but maybe there's a solution to fix this without it.
Here's a link to that Saturn emoji description, if it helps - https://emojipedia.org/ringed-planet/

Maybe, this python solution can remove 99% of all emoji https://gist.github.com/slowkow/7a7f61f495e3dbb7e3d767f97bd7304b
see the last post with updated emoji unicodes.

However, these two may strip filename from all the Chinese letters
\U000024C2-\U0001F251
\U00002500-\U00002BEF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.