Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Twitch: login failure due to missing twitchguard code #23337
Comments
|
This patch worked for me. I didn't see a generic way of passing cli params into InfoExtractor objects on/after creation, so I updated I applied the patch to a fork of youtube-dl, but I'm not going to PR it because there should be a more generic way of applying cli params to arbitrary IE's. With the patch, the workflow is:
Update: Twitch now returns |
|
@colakong i have the same issue with twitch. |
|
The only workaround at the moment seems to be to use the In short:
|
|
@david-wm-sanders <https://github.com/david-wm-sanders>
That works for me, thanks for the tip :)
…On Fri, Dec 20, 2019 at 3:05 AM David Sanders ***@***.***> wrote:
@PolygraphMusic <https://github.com/PolygraphMusic>
The only workaround at the moment seems to be to use the --cookies option
for youtube-dl as detailed here
<https://github.com/david-wm-sanders/youtube-dl#how-do-i-pass-cookies-to-youtube-dl>
.
In short:
1. Extract the cookies for domain .twitch.tv from your browser (see
the link above for extensions that do this extraction for you) to
cookies.txt
2. Run youtube-dl.exe --cookies=cookies.txt
https://www.twitch.tv/videos/<numeric_id> (do not use the youtube-dl
--username or --password options in this case)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23337?email_source=notifications&email_token=AB5YPITSRXFR7APECNBNKHDQZQZALA5CNFSM4JW6LUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHLXH4I#issuecomment-567768049>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5YPIWETH6RRCHW5HSPUBDQZQZALANCNFSM4JW6LUAA>
.
|
|
Now I get this: |
|
@CLUexe Could you provide the full output with youtube-dl's At a guess though, I'd say either your cookies (in the cookies file) are expired or, perhaps more likely, youtube-dl can't find the cookies file. For example, I got a HTTP 403 Forbidden error when I didn't pass the path to the cookies file correctly. I think it showed up as HTTP 403 but when I ran with
|
|
You were spot on, it had something to do with the cookies. The cookies from my Chrome browser gave me the errors but I tried using fresh cookies from Firefox and it worked. Honestly this stuff makes no sense to me if chrome can use the older cookies but youtube-dl can't. Anyway, thanks for your help! edit: Now that I think about it, when I logged in using firefox it did send me a code to my email to verify, so that's probably why the older cookies worked on chrome and not ytdl. |
|
If you don't want to bother with |
Checklist
Verbose log
Description
On trying to download a video from Twitch, I received the error as shown above. The video is open to subscribers only at the moment, hence the need to provide a username (with -u) and provide the account password at the prompt. On providing the password, login fails with a "missing twitchguard code" error message.
I ran youtube-dl again with --dump-pages and it shows:
The smaller base64 encoded dump, decoded with base64.b64decode(dump), shows:
It seems like Twitch have introduced a form of login verification - I received an email from Twitch with the subject "Your Twitch Login Verification Code" shortly after running youtube-dl, however there is no prompt by youtube-dl to provide this code in order to continue logging in.
As a note, if I enter an invalid password for the account, I still get
youtube_dl.utils.ExtractorError: Unable to login. Twitch said: invalid passwordso I am sure that the above error occurs after the password has been validated as correct by Twitch.