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: specific account not able to extract video data #26909

Closed
yhtojy opened this issue Oct 17, 2020 · 1 comment
Closed

Youtube: specific account not able to extract video data #26909

yhtojy opened this issue Oct 17, 2020 · 1 comment
Labels

Comments

@yhtojy
Copy link

@yhtojy yhtojy commented Oct 17, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

C:\Users\JamesW>"D:\Data\YoutubeDownloader\youtube-dl.exe" --cookies=newcookiefile.txt https://www.youtube.com/watch?v=kZOAG6nyIQo -v
[debug] System config: []
[debug] User config: ['-o', 'D:/Data/YoutubeDownloader/DL/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['--cookies=newcookiefile.txt', 'https://www.youtube.com/watch?v=kZOAG6nyIQo', '-v']
[debug] Encodings: locale cp950, fs mbcs, out cp950, pref cp950
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 4.3.1-2020-10-01-full_build-www.gyan.dev, ffprobe 4.3.1-2020-10-01-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] kZOAG6nyIQo: Downloading webpage
ERROR: kZOAG6nyIQo: YouTube said: Unable to extract video data
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 532, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\youtube.py", line 1910, in _real_extract
youtube_dl.utils.ExtractorError: kZOAG6nyIQo: YouTube said: Unable to extract video data

I use the same method to get cookie.txt for main and alt account.
Alt account can extract video data normally, but not the main account.
I need the membership content that is only available on main account.
With the same setting only change it to alt account's cookie.txt file, the link is extracted normally

What I have tried.

  1. Fresh install of firefox to get cookie.txt for main account. (only login to main account) Failed

  2. Switching to alt account on youtube page then get the cookie.txt. Since it is using alt account to extract. It extracts video data normally.

  3. I have asked my friend to try extract same link with his cookie.txt, he can extract it normally. We both have the 2FA on. My alt account doesn't have 2FA on.

  4. Using phone's internet to extract, still only main account failed.

  5. Tried to use non-valid cookie.txt, it will extract normally. That means it will only fail on extract if the main account cookie.txt is valid.

  6. Tried extract it on W7 and W10 (different computer), still getting the same result.

  7. Main account was working normally Oct. 10.

  8. Re login the account does nothing too.

I can watch youtube normally with my main account on browser.

Therefore, I conclude there must be something wrong with my main account.

I used --write-page getting the dump.
Looks like my main account got a different structure of HTML.

Main Gk_OVUlKL2Y_https_-_www.youtube.com_watchhl=en_bpctr=9999999999_disable_polymer=true_v=Gk_OVUlKL2Y_gl=US_has_verified=1.txt

ALT Gk_OVUlKL2Y_https_-_www.youtube.com_watchhl=en_disable_polymer=true_v=Gk_OVUlKL2Y_bpctr=9999999999_gl=US_has_verified=1.txt

How do I fix this problem?

@yhtojy yhtojy added the question label Oct 17, 2020
@yhtojy
Copy link
Author

@yhtojy yhtojy commented Oct 20, 2020

Thanks to october262.
youtube-dl --force-generic-extractor
It works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.