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] Sign in to confirm you’re not a bot. This helps protect our community #10128

Open
7 of 9 tasks
xpidev-afk opened this issue Jun 7, 2024 · 50 comments
Open
7 of 9 tasks
Labels
external issue Issue with an external tool site:youtube site-bug Issue with a specific website

Comments

@xpidev-afk
Copy link

xpidev-afk commented Jun 7, 2024

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Please make sure the question is worded well enough to be understood

I've been having this problem for a day when I make a query from YouTube, it's more frequent than normal and I'm using proxies

ERROR: [youtube] 4TWR90KJl84: Sign in to confirm you’re not a bot. This helps protect our community. Learn more

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-Uv', '--proxy', 'xxxxx', 'Q0W6wcio384']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [ae2af1104] (zip)
[debug] Python 3.8.10 (CPython x86_64 64bit) - Linux-5.15.0-105-generic-x86_64-with-glibc2.29 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg 4.2.7, ffprobe 4.2.7
[debug] Optional libraries: sqlite3-3.31.1
[debug] Proxy map: {'all': 'xxxx'}
[debug] Request Handlers: urllib
[debug] Loaded 1820 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
ERROR: Unable to obtain version info (EOF occurred in violation of protocol (_ssl.c:1131)); Please try again later or visit  https://github.com/yt-dlp/yt-dlp/releases/latest
[youtube] Extracting URL: Q0W6wcio384
[youtube] Q0W6wcio384: Downloading webpage
[youtube] Q0W6wcio384: Downloading ios player API JSON
ERROR: [youtube] Q0W6wcio384: Sign in to confirm you’re not a bot. This helps protect our community. Learn more
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 734, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 4248, in _real_extract
    self.raise_no_formats(reason, expected=True)
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 1257, in raise_no_formats
    raise ExtractorError(msg, expected=expected, video_id=video_id)
@xpidev-afk xpidev-afk added the question Question label Jun 7, 2024
@TheSystemGuy1337
Copy link

TheSystemGuy1337 commented Jun 7, 2024

DO NOT PASS YOUR COOKIES, See #10085 and #10108.

@coletdjnz

This comment was marked as outdated.

@coletdjnz coletdjnz closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
@coletdjnz coletdjnz added the duplicate This issue or pull request already exists label Jun 7, 2024
@arstum

This comment was marked as spam.

@bashonly bashonly reopened this Jun 10, 2024
@bashonly bashonly changed the title Problem Sign in to confirm you’re not a bot youtube [youtube] Sign in to confirm you’re not a bot. This helps protect our community Jun 10, 2024
@bashonly bashonly added external issue Issue with an external tool site-bug Issue with a specific website and removed duplicate This issue or pull request already exists question Question labels Jun 10, 2024
This was referenced Jun 10, 2024
@bashonly
Copy link
Member

bashonly commented Jun 10, 2024

Reportedly, authenticating with oauth (via this plugin) instead of cookies has been working for some users.

This sign-in requirement is affecting almost all apps that access Youtube, including the official Youtube web app.

@formernest
Copy link

formernest commented Jun 11, 2024

i have this problem today, so what is do not pass cookie, it worked last week


EDIT BY MAINTAINER:
Yes, this is a new problem that didn't exist a ~week ago.
Read the linked issues to learn why passing cookies is not a good idea now.

@jakeogh
Copy link
Contributor

jakeogh commented Jun 11, 2024

@Foremost

Unless you were already using --cookies-from-browser no change is necessary. Youtube is blocking videos (for me at least) whether you are passing cookies from your web browser or not. By default yt-dlp does not pass cookies, and youtube may block your request anyway. Ultimately this arms race must* be on the JS execution level and what that JS engine presents to the user.

  • well, technically, we could all have opted out from executing arb code long ago... but the browsers were bought via direct funding to the controlling foundation (Firefox) and/or created (Chrome) by major content providers (ahum google).

@formernest
Copy link

i have this problem today, so what is do not pass cookie, it worked last week

EDIT BY MAINTAINER: Yes, this is a new problem that didn't exist a ~week ago. Read the linked issues to learn why passing cookies is not a good idea now.

I don't pass any cookies, when i use -vU to show debug log, but it still not worked. Is it a bug need fix?

@TheSystemGuy1337
Copy link

TheSystemGuy1337 commented Jun 11, 2024

I don't pass any cookies, when i use -vU to show debug log, but it still not worked. Is it a bug need fix?

YouTube has flagged and blocked your IP. You can try using OAuth to work around this, but there are no guarantees it will work for you. You may have to wait until you are assigned a new IP by your ISP. This can take around ~1 week to several months depending on your ISP. Most people have dynamic IPs, so your IP will eventually change. As I mentioned before, see #10085 and #10108 for more information. These issues are also listed in their FAQ.

@forxxin
Copy link

forxxin commented Jun 13, 2024

Embedding mode {'cookiesfrombrowser': ('firefox',),} works for now

cookiesfrombrowser: A tuple containing the name of the browser, the profile

cookiesfrombrowser:  A tuple containing the name of the browser, the profile
                   name/path from where cookies are loaded, the name of the keyring,
                   and the container name, e.g. ('chrome', ) or
                   ('vivaldi', 'default', 'BASICTEXT') or ('firefox', 'default', None, 'Meta')

@DimonKhutornoy
Copy link

DimonKhutornoy commented Jun 13, 2024

@forxxin , but i have next problem:
FileNotFoundError: could not find firefox cookies database in /home/$my name$/.mozilla/firefox.

Where i can find this file?

@joliedevil
Copy link

Your IP has been blacklisted by YouTube. Use a proxy with the following command:

yt-dlp --proxy "userProxy:passwordProxy@ipProxy" URL

@gamer191
Copy link
Collaborator

Can someone who's affected by this please send a verbose log of yt-dlp -v --extractor-args "youtube:player_client=tv_embedded,mediaconnect" URL

@TheSystemGuy1337
Copy link

Your IP has been blacklisted by YouTube. Use a proxy with the following command:

yt-dlp --proxy "userProxy:passwordProxy@ipProxy" URL

VPNs and proxies WILL NOT work as YouTube actively blocks them as well.

@coletdjnz
Copy link
Member

coletdjnz commented Sep 14, 2024

With #10648 merged, supplying a valid PO Token may help in some cases.

See the PO Token Guide and po_token extractor arg for more details.

If you are still getting IP blocked with a valid PO Token then you are likely either downloading too much too fast and need to slow down, and/or are running from a DC IP which are susceptible to being blocked. We cannot help with this.

Note: requires yt-dlp nightly

@LumenYoung
Copy link

With #10648 merged, supplying a valid PO Token may help in some cases.

See the PO Token Guide and po_token extractor arg for more details.

If you are still getting IP blocked with a valid PO Token then you are likely either downloading too much too fast and need to slow down, and/or are running from a DC IP which are susceptible to being blocked. We cannot help with this.

Note: requires yt-dlp nightly

Thanks for the update, yet I wonder if we have a way to implement downloading playlist items with random interval (longer interval) so that it appears more natural?

@LumenYoung
Copy link

LumenYoung commented Sep 14, 2024

I didn't find corresponding command line argument from yt-dlp (correct me if I'm wrong). But since this is quiet straight forward to implement. I wrote the following script to 1) fetch a playlist first 2) parse for items 3) download them individually with random pause.

For anyone want to try this idea out: https://gist.github.com/LumenYoung/5923050fe35b248b876906448684f82b. I'm not sure it can be used to bypass the rate limit.

@seproDev
Copy link
Member

--sleep-interval SECONDS        Number of seconds to sleep before each
                                download. This is the minimum time to sleep
                                when used along with --max-sleep-interval
                                (Alias: --min-sleep-interval)
--max-sleep-interval SECONDS    Maximum number of seconds to sleep. Can only
                                be used along with --min-sleep-interval

If you set both min and max interval, the actual interval is randomized. Consider also adding --sleep-requests.
An example command line option would be --sleep-requests 1.5 --min-sleep-interval 60 --max-sleep-interval 90

@yt-dlp yt-dlp locked and limited conversation to collaborators Sep 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external issue Issue with an external tool site:youtube site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests