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

Could not find JS function 'encodeURIComponent' #18873

Closed
4 of 9 tasks
Khang-NT opened this issue Jan 16, 2019 · 19 comments
Closed
4 of 9 tasks

Could not find JS function 'encodeURIComponent' #18873

Khang-NT opened this issue Jan 16, 2019 · 19 comments

Comments

@Khang-NT
Copy link
Contributor

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.

@Khang-NT
Copy link
Contributor Author

Khang-NT added a commit to Khang-NT/youtube-dl that referenced this issue Jan 16, 2019
@DanLCD
Copy link

DanLCD commented Jan 17, 2019

I'm having the same issue

@0xpr03
Copy link

0xpr03 commented Jan 17, 2019

Same with this one: https://www.youtube.com/watch?v=Wm8vcFn0bgY

@carlbennett
Copy link

carlbennett commented Jan 17, 2019

I am having this issue on this video: https://youtu.be/AgbeGFYluEA
logs.txt
verbose logs.txt

@corybsa
Copy link

corybsa commented Jan 17, 2019

I'm having the same issue with https://www.youtube.com/watch?v=AgbeGFYluEA (this is a youtube red video, just fyi). I'm on version 2019.01.16.

@Mydayyy
Copy link

Mydayyy commented Jan 17, 2019

I am running into this issue a lot, especially in newer videos. In case you need more non-working youtube links let me know.

@DantasB
Copy link

DantasB commented Jan 17, 2019

I'm trying to run but i'm having the same issue with a lot of youtube videos. I'm on version 2019.01.16

@lukeeckley
Copy link

I am running into this problem too. I'm on the newest version 2019.01.16

@Feche
Copy link

Feche commented 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

@Mydayyy
Copy link

Mydayyy commented Jan 17, 2019

@fcharlier

Which commit are you refering to? The latest commit is the 2019.01.16 release.

Are you talking about the fork from Khang-NT?

@Feche
Copy link

Feche commented Jan 17, 2019

@fcharlier

Which commit are you refering to? The latest commit is the 2019.01.16 release.

Are you talking about the fork from Khang-NT?

Yes I'm sorry, I was referring to the fork from Khang-NT

@KasparoVy
Copy link

KasparoVy commented 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

@linuxbird
Copy link

Proposed fix works here.

@marvinlloydocampo
Copy link

I initially installed it through brew, however I don't know how to install youtube-dl from Khang-NT's fork. (is this possible?)
So i Installed it with pip instead. And working on my end now too. Thanks @Khang-NT and @carlbennett for linking this issue. 👍

@KlfJoat
Copy link

KlfJoat commented Jan 17, 2019

For future reference, how would I go about installing the original youtube-dl once this gets fixed in master?

@DantasB
Copy link

DantasB commented Jan 17, 2019

It worked <3, ty guys!

@aasutossh
Copy link

aasutossh commented Jan 17, 2019

For future reference, how would I go about installing the original youtube-dl once this gets fixed in master?

Just install original youtube-dl using pip; depends on os. https://github.com/rg3/youtube-dl#installation

@0xpr03
Copy link

0xpr03 commented Jan 17, 2019

@Khang-NT could do a PR to get this fixed upstream.

@dstftw dstftw closed this as completed Jan 18, 2019
@eshack94
Copy link

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

Can confirm this works. Thanks so much!

@ytdl-org ytdl-org locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests