LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   any workaround for this youtube-dl bug? (https://www.linuxquestions.org/questions/linux-general-1/any-workaround-for-this-youtube-dl-bug-4175719671/)

newbiesforever 12-11-2022 03:39 PM

any workaround for this youtube-dl bug?
 
I have tried to use youtube-dl -x to download the audio from some videos. It is giving the following error message:

Code:

[youtube] xfYS9ZE7-uo: Downloading webpage
[youtube] xfYS9ZE7-uo: Downloading player 72d3c60a
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1265, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1332, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/lib/python3/dist-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/lib/python3/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/lib/python3/dist-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
youtube_dl.utils.ExtractorError: Unsupported JS expression 'try{var e=b.call(a.j.C,c)'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
 (caused by ExtractorError("Unsupported JS expression 'try{var e=b.call(a.j.C,c)'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

This makes youtube-dl useless for the moment to me. Any ideas?

rokytnji 12-11-2022 04:07 PM

https://github.com/yt-dlp/yt-dlp

https://linuxconfig.org/yt-dlp-vs-youtube-dl

Good luck.

jefro 12-13-2022 05:46 PM

Might be an old version of Yt.

aus9 12-13-2022 07:28 PM

in addition to above your code box shows you can run that command with verbose to get more info

Quote:

Be sure to call youtube-dl with the --verbose flag
example of verbose
Code:

youtube-dl --verbose https://youtu.be/5uzf6X67upQ
[debug] Command-line config: ['--verbose', 'https://youtu.be/5uzf6X67upQ']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.29 [9d339c41e]
[debug] Python 3.9.2 (CPython 64bit) - Linux-5.19.0-14.1-liquorix-amd64-x86_64-with-glibc2.31 (glibc 2.31)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.3.5-0.1, ffprobe 4.3.5-0.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.9.7, brotli-1.0.9, certifi-2020.06.20, mutagen-1.45.1, pyxattr-0.7.2, sqlite3-2.6.0, websockets-8.1
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://youtu.be/5uzf6X67upQ
[youtube] 5uzf6X67upQ: Downloading webpage
[youtube] 5uzf6X67upQ: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 5uzf6X67upQ: Downloading 1 format(s): 248+251
[debug] Invoking http downloader on "https://rr3---sn-fpqxc5oq-2xge.googlevideo.com/videoplayback?expire=1671002836&ei=dCaZY7S6BJTK9QPyxZyQAQ&ip=159.196.135.119&id=o-AIKrcTKC-Pja6fFgZQ6SaouJxxGmktyVxlW3Y8Mj0uMl&itag=248&source=youtube&requiressl=yes&mh=Ik&mm=31%2C29&mn=sn-fpqxc5oq-2xge%2Csn-hxa7zn7s&ms=au%2Crdu&mv=m&mvi=3&pl=22&initcwndbps=1931250&vprv=1&mime=video%2Fwebm&gir=yes&clen=10241346&dur=75.299&lmt=1648896712508504&mt=1670980901&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5437434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgcbvGkDkJdgcg6KVRLrU_TWXFn9_6gwiX0BE0KkHfKy8CIDH9OmlNk0w-kL3WF1ZnaaPxNvX0DMfNi7KXq7MBgVs2&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhALik2UDM7tXJFrE53QAno9Nn_m5jDJEdlTat0U5zytLQAiEAk6F_ttrj_cWdAEpBNwIdAD-h1QVAEiXl-jF8CkLQ5SQ%3D"
[download] Destination: another Skull classic!!������������ [5uzf6X67upQ].f248.webm
[download] 100% of 9.77MiB in 00:03
[debug] Invoking http downloader on "https://rr3---sn-fpqxc5oq-2xge.googlevideo.com/videoplayback?expire=1671002836&ei=dCaZY7S6BJTK9QPyxZyQAQ&ip=159.196.135.119&id=o-AIKrcTKC-Pja6fFgZQ6SaouJxxGmktyVxlW3Y8Mj0uMl&itag=251&source=youtube&requiressl=yes&mh=Ik&mm=31%2C29&mn=sn-fpqxc5oq-2xge%2Csn-hxa7zn7s&ms=au%2Crdu&mv=m&mvi=3&pl=22&initcwndbps=1931250&vprv=1&mime=audio%2Fwebm&gir=yes&clen=1021019&dur=75.381&lmt=1648893446971695&mt=1670980901&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAOMAgTDTMT2t0VlacEdrfTWfrmM9nZG-KjzM4ZyB_FXnAiEAhHgldAD3amz_pFUwUDsujE3y_HXTtGbFw6yoqvkFZZM%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhALik2UDM7tXJFrE53QAno9Nn_m5jDJEdlTat0U5zytLQAiEAk6F_ttrj_cWdAEpBNwIdAD-h1QVAEiXl-jF8CkLQ5SQ%3D"
[download] Destination: another Skull classic!!������������ [5uzf6X67upQ].f251.webm
[download] 100% of 997.09KiB in 00:00
[Merger] Merging formats into "another Skull classic!!������������ [5uzf6X67upQ].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:another Skull classic!!������������ [5uzf6X67upQ].f248.webm' -i 'file:another Skull classic!!������������ [5uzf6X67upQ].f251.webm' -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart 'file:another Skull classic!!������������ [5uzf6X67upQ].temp.webm'
Deleting original file another Skull classic!!������������ [5uzf6X67upQ].f251.webm (pass -k to keep)
Deleting original file another Skull classic!!������������ [5uzf6X67upQ].f248.webm (pass -k to keep)


jefro 12-13-2022 10:59 PM

yt-dlp version 2022.06.29

Didn't know that.

aus9 12-14-2022 12:53 AM

debian is https://packages.debian.org/bullseye/youtube-dl v 2021.06.06-1

mine comes from MX distro and may be out of date

upstream https://youtube-dl.org/
v2021.12.17

pan64 12-14-2022 01:14 AM

just some background information: youtube modifies their services continuously (you can say improve them if you wish). Therefore, the downloader must somehow track these undocumented changes. Youtube doesn't really care that the downloader works (or is compatible) either. So better to use an uptodate version, as it was suggested (Make sure you are using the latest version) or use a better alternative (see post #2)

business_kid 12-14-2022 04:02 AM

This usually does it
Code:

sudo youtube-dl -U
I prefer yt-dlp because it doesn't succumb to youtube's bandwidth-limiting tricks nearly as much.

teckk 12-14-2022 08:15 AM

+ one for yt-dlp
https://github.com/yt-dlp/yt-dlp

teckk 12-14-2022 08:34 AM

Quote:

This makes youtube-dl useless for the moment to me. Any ideas?
You can always scrape the virtual url for the video that you wish, and manually dump the audio from it. Use your web inspector or python script etc.

I just looked at the video you are trying to get.

https://m.youtube.com/watch?v=xfYS9ZE7-uo

Format 140(m4a)

Code:

url="https://rr4---sn-vgqsrnes.googlevideo.com/videoplayback?expire=1671049780&ei=1N2ZY9__Ovew2_gPtIutqAI&ip=108.188.145.145&id=o-AI08cDxwhq9YikeO9csoWPxZZ60itX-1XS5ftuvhIMuc&itag=140&source=youtube&requiressl=yes&mh=PV&mm=31%2C29&mn=sn-vgqsrnes%2Csn-vgqskn6z&ms=au%2Crdu&mv=m&mvi=4&pl=21&initcwndbps=1205000&spc=SFxXNnT25xTfHI07QonbbpwZ6_oXtWs&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=33088035&otfp=1&dur=2044.447&lmt=1625421874993145&mt=1671027694&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=7211222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cotfp%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAOwNAR2XJtJzwqjcXDHFXmU6zf4_Ydgf5IzhwIm1k7Y5AiAxEUEiwTFnMTFsymw9HeF73TBi9drAtO9ZJyUkTILZ_w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgV1ZqtWJX-864BPBnZwjXYVL8-Q53lUpuFaubmRiKENYCIDiRPmYSas8ALDOKwuLBRy8a1qZdThlkuLsNWraZzJii"

ffmpeg -i "$url" -vn -c:a copy myaud.m4a

That virtual url is probably only good for a bit. But, I was able to download it.

newbiesforever 12-19-2022 02:02 PM

I find this to be more evidence that Youtube is at fault: on further attempts, I find that sometimes the audio downloads normally; and sometimes it fails with that error message . It's unpredictable.

pan64 12-20-2022 01:23 AM

Quote:

Originally Posted by business_kid (Post 6397778)
This usually does it
Code:

sudo youtube-dl -U
I prefer yt-dlp because it doesn't succumb to youtube's bandwidth-limiting tricks nearly as much.

you must not use sudo with that downloader, that is pointless

business_kid 12-20-2022 03:45 AM

Not on my box. Youtube-dl is in /usr/local/bin.

pan64 12-20-2022 09:30 AM

Quote:

Originally Posted by business_kid (Post 6399090)
Not on my box. Youtube-dl is in /usr/local/bin.

And? why did you post that?

hish2021 12-20-2022 09:41 AM

Code:

-U, --update                        Update this program to latest version.
                                    Make sure that you have sufficient
                                    permissions (run with sudo if needed)

^ from the GitHub page.
I download the binary to ~/bin and run it from there. Then, youtube-dl -U is enough; no sudo.

I now use yt-dlp. Same there.


All times are GMT -5. The time now is 06:56 PM.