Could not find JS function 'encodeURIComponent'

See original GitHub issue

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

  • I’ve verified and I assure that I’m running youtube-dl 2019.01.16

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description

I got error report from server with this stacktrace:

Signature extraction failed: Traceback (most recent call last):
  File "/home/ubuntu/virtual_environment/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1232, in _decrypt_signature
    video_id, player_url, s
  File "/home/ubuntu/virtual_environment/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1139, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/home/ubuntu/virtual_environment/lib/python3.5/site-packages/youtube_dl/extractor/youtube.py", line 1207, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/home/ubuntu/virtual_environment/lib/python3.5/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
    raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'encodeURIComponent'; 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("Could not find JS function 'encodeURIComponent'; 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.

I have the link of video caused this issue, but I can’t reproduce it in my machine: https://www.youtube.com/watch?v=dChN0N0U7G4 And here is the JS url: https://www.youtube.com/yts/jsbin/player_ias-vfl3bQWS-/en_US/base.js

Seem like it not happen all time, but this issue becomes trending as I can see in crash report.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
Fechecommented, Jan 17, 2019

I compiled youtube-dl for Linux with the latest commit, and I can confirm that now works, I’ll leave the file for Linux youtube-dl.zip

9reactions
KasparoVycommented, Jan 17, 2019

Can confirm OP’s fix works, resolved the issue for me. Thanks a ton! Users can install it with pip using pip install https://github.com/Khang-NT/youtube-dl/archive/master.zip which will uninstall current youtube-dl and replace with the fix on the fork Windows 10 1803 btw

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery encodeURIComponent page not found error
I'm trying to encode my uri by using encodeURIComponent function. Here is my code.
Read more >
encodeURIComponent() - JavaScript - MDN Web Docs
The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape ...
Read more >
1670567 – Could not find JS function 'encodeURIComponent'
Description of problem: youtube_dl.utils.ExtractorError: Could not find JS function 'encodeURIComponent'; please report this issue on ...
Read more >
JavaScript encodeURI(), decodeURI() and its components ...
Return Value: This function returns the encoded string. Example: In this example, we will see how to encode a string usingencodeURIComponent().
Read more >
Tip #44[encodeURIComponent] - JavaScript everyday - Medium
Note that the encodeURI function is not appropriate for such scenario, ... As a result the food search parameter does not contain the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found