ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.41k stars 10.04k forks source link

RegexNotFoundError: Unable to extract Initial JS player signature function name #17684

Closed ScorchRaserik closed 6 years ago

ScorchRaserik commented 6 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.09.26. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl -v https://www.youtube.com/watch?v=R__WfTD8rJs
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=R__WfTD8rJs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.03
[debug] Python version 3.5.3 (CPython) - Linux-4.9.59-v7+-armv7l-with-debian-9.4
[debug] exe versions: avconv 3.2.10-1, avprobe 3.2.10-1, ffmpeg N-89740-g476665d4de, ffprobe N-89740-g476665d4de
[debug] Proxy map: {}
[youtube] R__WfTD8rJs: Downloading webpage
[youtube] R__WfTD8rJs: Downloading video info webpage
[youtube] R__WfTD8rJs: Extracting video information
[youtube] {18} signature length 42.42, html5 player vfluVXjLS
[youtube] R__WfTD8rJs: Downloading player https://www.youtube.com/yts/jsbin/player-vfluVXjLS/en_US/base.js
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1191, in _decrypt_signature
    video_id, player_url, s
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1102, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1163, in _parse_sig_js
    jscode, 'Initial JS player signature function name', group='sig')
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 796, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; 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 RegexNotFoundError('Unable to extract \x1b[0;34mInitial JS player signature function name\x1b[0m; 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.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1191, in _decrypt_signature
    video_id, player_url, s
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1102, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1163, in _parse_sig_js
    jscode, 'Initial JS player signature function name', group='sig')
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 796, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; 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.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1191, in _decrypt_signature
    video_id, player_url, s
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1102, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1163, in _parse_sig_js
    jscode, 'Initial JS player signature function name', group='sig')
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 796, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 785, in extract_info
    ie_result = ie.extract(url)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 440, in extract
    ie_result = self._real_extract(url)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1899, in _real_extract
    encrypted_sig, video_id, player_url, age_gate)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1201, in _decrypt_signature
    'Signature extraction failed: ' + tb, cause=e)
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1191, in _decrypt_signature
    video_id, player_url, s
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1102, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1163, in _parse_sig_js
    jscode, 'Initial JS player signature function name', group='sig')
  File "/home/pi/.local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 796, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; 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 RegexNotFoundError('Unable to extract \x1b[0;34mInitial JS player signature function name\x1b[0m; 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.

Description of your issue, suggested solution and other information

Trying to run youtube-dl on my Raspberry Pi 3. About 75% of the songs fail.

The one in the error message up there fails, along with these others (same error message): https://www.youtube.com/watch?v=R__WfTD8rJs https://www.youtube.com/watch?v=vSkb0kDacjs https://www.youtube.com/watch?v=i1y5nqWSrZE https://www.youtube.com/watch?v=S73ypK3As8I

These work: https://www.youtube.com/watch?v=Q2W2TeUUYps https://www.youtube.com/watch?v=wYsMjEeEg4g

This was happening in both 2018.09.18 and now in 2018.09.26. I tried updating absolutely everything on my Pi to get it to work a week ago, figured I'd wait for an update to youtube-dl, as YouTube might've updated and I know that breaks youtube-dl. Unfortunately, the youtube-dl update did not fix the issue.

ScorchRaserik commented 6 years ago

Ignore me, I just saw

[debug] youtube-dl version 2018.03.03

I don't know why pip install youtube-dl --update didn't work