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 #204

Open
6 tasks done
yhtojy opened this issue Oct 19, 2020 · 6 comments
Open
6 tasks done

YouTube: specific account not able to extract video data #204

yhtojy opened this issue Oct 19, 2020 · 6 comments

Comments

@yhtojy
Copy link

yhtojy commented Oct 19, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dlc version 2020.10.09
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

C:\Users\JamesW>"D:\Data\YoutubeDownloader\youtube-dlc.exe" --cookies=newcookiefile.txt https://www.youtube.com/watch?v=v32ZQIg1j4Y --write-page -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=v32ZQIg1j4Y', '--write-page', '-v']
[debug] Loading archive file None
[debug] Encodings: locale cp950, fs utf-8, out utf-8, pref cp950
[debug] youtube-dlc version 2020.10.09
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.18362-SP0
[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] v32ZQIg1j4Y: Downloading webpage
[youtube] Saving request to v32ZQIg1j4Y_https_-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.dump
ERROR: v32ZQIg1j4Y: YouTube said: Unable to extract video data
Traceback (most recent call last):
  File "youtube_dlc\YoutubeDL.py", line 830, in extract_info
  File "youtube_dlc\extractor\common.py", line 532, in extract
  File "youtube_dlc\extractor\youtube.py", line 1962, in _real_extract
youtube_dlc.utils.ExtractorError: v32ZQIg1j4Y: YouTube said: Unable to extract video data

Description

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, however, all youtube links cannnot be extracted when login with 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 to extract the 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 on Oct. 10.

  8. Re login the account on the browser to get new cookie.txt does nothing too.

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

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

Main v32ZQIg1j4Y_https__www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.txt

ALT v32ZQIg1j4Y_https_-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.txt

The dump is almost the same as CTRL+S on the browser to get the HTML file.

Therefore, I conclude there must be something wrong with my main account.
However, I tried to match all youtube settings in my main and alt account.
The only difference is main account has the channel function opened (for streaming).

Is there any way to fix the extractor for this problem?

@october262
Copy link

on the main account, try this > youtube-dl --force-generic-extractor https://www.youtube.com/watch?v=v32ZQIg1j4Y
see if the video now downloads.

@yhtojy
Copy link
Author

yhtojy commented Oct 20, 2020

C:\Users\JamesW>"D:\Data\YoutubeDownloader\youtube-dlc.exe" --cookies=newcookiefile.txt https://www.youtube.com/watch?v=v32ZQIg1j4Y --force-generic-extractor -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=v32ZQIg1j4Y', '--force-generic-extractor', '-v']
[debug] Loading archive file None
[debug] Encodings: locale cp950, fs utf-8, out utf-8, pref cp950
[debug] youtube-dlc version 2020.10.09
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.18362-SP0
[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: {}
[generic] watch?v=v32ZQIg1j4Y: Requesting header
WARNING: Forcing on generic information extractor.
[generic] watch?v=v32ZQIg1j4Y: Downloading webpage
[generic] watch?v=v32ZQIg1j4Y: Extracting information
[youtube] v32ZQIg1j4Y: Downloading webpage
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://r2---sn-ipoxu-umb6.googlevideo.com/videoplayback?expire=1603186535&ei=B1uOX-j5NcOEqAGr84aQCA&ip=2001%3Ab400%3Ae48e%3A20d7%3Af071%3A372e%3Ad58d%3Ab7b1&id=o-AKuEblWZfrOTFmQehjIAcdbK28v3cIgiHiP-TOzjomJF&itag=248&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mh=xg&mm=31%2C29&mn=sn-ipoxu-umb6%2Csn-un57en7e&ms=au%2Crdu&mv=m&mvi=2&pl=44&initcwndbps=1003750&vprv=1&mime=video%2Fwebm&gir=yes&clen=20343888&dur=115.960&lmt=1603036605973986&mt=1603164752&fvip=2&keepalive=yes&fexp=23915654&c=WEB&txp=5535434&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgHfv6oa99Mqo-wy99oIrpWtI4MuKkWYmHpKfs4TWQHsYCIGGijPDtvQOXMfkSJ0hCpXlnZdkmHY82q3x_b2ZJsh2J&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhANlR82VNyh7F0oWvKMZkNoNwHJiFLbsN7Sil9EDjJhdFAiBd8ckiEuuAWuFZQ7pfju64cXYmcYL0HFlnLkFFUJzGuA%3D%3D&ratebypass=yes'
[download] Destination: D:\Data\YoutubeDownloader\DL\Gura Talks about her Weakness! (Guraphobia)【 Gawr Gura _ HololiveEN 】.f248.webm
[download] 5.4% of 19.40MiB at 285.29KiB/s ETA 01:05
ERROR: Interrupted by user

omg, it works like a charm.
It works for member's exclusive video link too.
Thank you very much.

@yhtojy yhtojy closed this as completed Oct 20, 2020
@yhtojy
Copy link
Author

yhtojy commented Oct 22, 2020

Main account Log

C:\Users\JamesW>"D:\Data\YoutubeDownloader\youtube-dlc.exe" --cookies=newcookiefile.txt https://www.youtube.com/watch?v=v32ZQIg1j4Y --force-generic-extractor -v --write-page
[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=v32ZQIg1j4Y', '--force-generic-extractor', '-v', '--write-page']
[debug] Loading archive file None
[debug] Encodings: locale cp950, fs utf-8, out utf-8, pref cp950
[debug] youtube-dlc version 2020.10.09
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.18362-SP0
[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: {}
[generic] watch?v=v32ZQIg1j4Y: Requesting header
WARNING: Forcing on generic information extractor.
[generic] watch?v=v32ZQIg1j4Y: Downloading webpage
[generic] Saving request to watchv=v32ZQIg1j4Y_https_-www.youtube.com_watchv=v32ZQIg1j4Y.dump
[generic] watch?v=v32ZQIg1j4Y: Extracting information
WARNING: [generic] watch?v=v32ZQIg1j4Y: Failed to parse JSON Expecting value: line 1 column 135 (char 134)
[youtube] v32ZQIg1j4Y: Downloading webpage
[youtube] Saving request to v32ZQIg1j4Y_https
-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.dump
ERROR: v32ZQIg1j4Y: YouTube said: Unable to extract video data
Traceback (most recent call last):
File "youtube_dlc\YoutubeDL.py", line 830, in extract_info
File "youtube_dlc\extractor\common.py", line 532, in extract
File "youtube_dlc\extractor\youtube.py", line 1962, in _real_extract
youtube_dlc.utils.ExtractorError: v32ZQIg1j4Y: YouTube said: Unable to extract video data

Alt Account Log

C:\Users\JamesW>"D:\Data\YoutubeDownloader\youtube-dlc.exe" --cookies=newcookiefile.txt https://www.youtube.com/watch?v=v32ZQIg1j4Y --force-generic-extractor -v --write-page
[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=v32ZQIg1j4Y', '--force-generic-extractor', '-v', '--write-page']
[debug] Loading archive file None
[debug] Encodings: locale cp950, fs utf-8, out utf-8, pref cp950
[debug] youtube-dlc version 2020.10.09
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.18362-SP0
[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: {}
[generic] watch?v=v32ZQIg1j4Y: Requesting header
WARNING: Forcing on generic information extractor.
[generic] watch?v=v32ZQIg1j4Y: Downloading webpage
[generic] Saving request to watchv=v32ZQIg1j4Y_https_-www.youtube.com_watchv=v32ZQIg1j4Y.dump
[generic] watch?v=v32ZQIg1j4Y: Extracting information
[youtube] v32ZQIg1j4Y: Downloading webpage
[youtube] Saving request to v32ZQIg1j4Y_https
-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.dump
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://r2---sn-ipoxu-umb6.googlevideo.com/videoplayback?expire=1603349874&ei=EtmQX7r2HYzG4gLS3LzYDA&ip=59.126.3.111&id=o-AG1w48rZ_9HOHjfZbqSKwoBUsPMcsVD8LrbSoUHvAVMx&itag=248&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&mh=xg&mm=31%2C29&mn=sn-ipoxu-umb6%2Csn-un57sn7z&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=1067500&vprv=1&mime=video%2Fwebm&gir=yes&clen=20343888&dur=115.960&lmt=1603036605973986&mt=1603328203&fvip=2&keepalive=yes&fexp=23915654&c=WEB&txp=5535434&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAOsz0edEd77s-UzuX03EKVj5gdIbVACBCPR11gR5IelyAiBUzNrE-0L5uR01RlajfRYIPH6hjJgGrqZyikrZz6uKJw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhANQINsGxB39NHw6Um4yU58uYM700jLPH-e6Vfv8OwI50AiEA-jCiyV9PjUGnuJeiVUQ1yzQCrmcMS20zojq3aX5mCok%3D&ratebypass=yes'
[download] Destination: D:\Data\YoutubeDownloader\DL\Gura Talks about her Weakness! (Guraphobia)【 Gawr Gura _ HololiveEN 】.f248.webm
[download] 5.1% of 19.40MiB at 2.14MiB/s ETA 00:08
ERROR: Interrupted by user

Alt [generic] watchv=v32ZQIg1j4Y_https_-_www.youtube.com_watchv=v32ZQIg1j4Y.txt
Alt [youtube]https-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.txt
main [generic] watchv=v32ZQIg1j4Y_https_-_www.youtube.com_watchv=v32ZQIg1j4Y.txt
main [youtube]https-_www.youtube.com_watchv=v32ZQIg1j4Y_gl=US_hl=en_has_verified=1_bpctr=9999999999_disable_polymer=true.txt

After 2 days. Youtube break it again :(
Main account break at WARNING: [generic] watch?v=v32ZQIg1j4Y: Failed to parse JSON Expecting value: line 1 column 135 (char 134)
Alt account won't get this error even using --force-generic-extractor.

@yhtojy yhtojy reopened this Oct 22, 2020
@october262
Copy link

tried this link - https://www.youtube.com/watch?v=v32ZQIg1j4Y
with both youtube-dl and youtube-dlc and both downloaded the video just fine.

@yhtojy
Copy link
Author

yhtojy commented Oct 22, 2020

Yes, it's problem only happens on the specific account.
My alt account can extract data normally.
But I need main account for the member's only content.
The --write-page gives a very different structure of webpage from main and alt.

The only different youtube setting is main account has "channel" function opened.

Probably same issue as ytdl-org#26936

Might the Channel function caused this?

@yhtojy
Copy link
Author

yhtojy commented Oct 22, 2020

I just opened the Channel function on my alt account.
Alt account can still extract video normally.

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

No branches or pull requests

2 participants