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

[youtube]fix for token not in video infor #20770

Closed
wants to merge 2 commits into from
Closed

[youtube]fix for token not in video infor #20770

wants to merge 2 commits into from

Conversation

FindHao
Copy link

@FindHao FindHao commented Apr 24, 2019

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

There is an urgent change of youtube that they change token parameter to account_playback_token, so youtube-dl can not parse the result correctly. There are some issues about this problem
Fixes #20761 #20764 #20766 #20767 #20768 #20769

Copy link

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the bug for me.

@bugfood
Copy link

bugfood commented Apr 24, 2019

Thanks for this. I get the following error:

$ make
mkdir -p zip
for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \
  mkdir -p zip/$d ;\
  cp -pPR $d/*.py zip/$d/ ;\
done
touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py
mv zip/youtube_dl/__main__.py zip/
cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py
rm -rf zip
echo '#!/usr/bin/env python' > youtube-dl
cat youtube-dl.zip >> youtube-dl
rm youtube-dl.zip
chmod a+x youtube-dl
COLUMNS=80 /usr/bin/env python youtube_dl/__main__.py --help | /usr/bin/env python devscripts/make_readme.py
Traceback (most recent call last):
  File "youtube_dl/__main__.py", line 16, in <module>
    import youtube_dl
  File "/usr/local/src/youtube-dl/youtube_dl/__init__.py", line 43, in <module>
    from .extractor import gen_extractors, list_extractors
  File "/usr/local/src/youtube-dl/youtube_dl/extractor/__init__.py", line 9, in <module>
    from .extractors import *
  File "/usr/local/src/youtube-dl/youtube_dl/extractor/extractors.py", line 8, in <module>
    from .abcnews import (
  File "/usr/local/src/youtube-dl/youtube_dl/extractor/abcnews.py", line 10, in <module>
    from .youtube import YoutubeIE
  File "/usr/local/src/youtube-dl/youtube_dl/extractor/youtube.py", line 1682
    video_info['token'] = video_info['account_playback_token']
             ^
IndentationError: expected an indented block
Traceback (most recent call last):
  File "devscripts/make_readme.py", line 19, in <module>
    options = helptext[helptext.index('  General Options:') + 19:]
ValueError: substring not found
make: *** [Makefile:76: README.md] Error 1

When I indent the line by an additional four spaces, it works fine. Thanks again.

-Corey

@FindHao FindHao changed the title fix token not in video infor bug [youtube]fix for token not in video infor Apr 24, 2019
@FindHao
Copy link
Author

FindHao commented Apr 24, 2019

@bugfood Sorry for the mistake. I have update the code to add the indents.

@dstftw dstftw closed this in 56667d6 Apr 24, 2019
@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 24, 2019
meunierd referenced this pull request in meunierd/youtube-dl Dec 27, 2019
…, closes #20762, closes #20764, closes #20766, closes #20767, closes #20769, closes #20771, closes #20768, closes #20770)
meunierd referenced this pull request in meunierd/youtube-dl Feb 13, 2020
…, closes #20762, closes #20764, closes #20766, closes #20767, closes #20769, closes #20771, closes #20768, closes #20770)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"token" parameter not in video info for unknown reason
3 participants