Open safetys123 opened 3 months ago
It maybe a bug....? I think. When i execute the comand yt-dlp -v --username oauth2 --password '' "https://www.youtube.com/watch?v=2mWbEZjqCYk
, i can get the same result as yours.
But when i add the args with --paths ./download/
which set the video download path,
OR add the args with --cache-dir ./cache/yt-dlp_10
which set the save path of oauth cache,
i can get the the device code initializing.... ^-^
Here is my detail:
(.venv) PS F:\AInoriex-crawler_youtube_downloader> yt-dlp -v --username oauth2 --password '' --cache-dir ./cache/yt-dlp_10 https://www.youtube.com/watch?v=2mWbEZjqCYk
[debug] Command-line config: ['-v', '--username', 'PRIVATE', '--password', 'PRIVATE', './cache/yt-dlp_10', 'https://www.youtube.com/watch?v=2mWbEZjqCYk']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.07.16 from yt-dlp/yt-dlp [89a161e8c] (pip)
[debug] Python 3.11.2 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1s 1 Nov 2022)
[debug] exe versions: ffmpeg 4.4-full_build-www.gyan.dev (setts), ffprobe 4.4-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, mutagen-1.47.0, requests-2.32.3, sqlite3-3.39.4, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {'https': 'http://127.0.0.1:7890', 'http': 'http://127.0.0.1:7890'}
[debug] Request Handlers: urllib, requests, websockets
[debug] Extractor Plugins: oauth2 (YoutubeBaseInfoExtractor), oauth2 (YoutubeClipIE), oauth2 (YoutubeConsentRedirectIE), oauth2 (YoutubeFavouritesIE), oauth2 (YoutubeIE), oauth2 (YoutubeMusicSearchURLIE), oauth2 (YoutubeNotificationsIE), oauth2 (YoutubeSearchDateIE), oauth2 (YoutubeSearchIE), oauth2 (YoutubeSearchURLIE), oauth2 (YoutubeTabBaseInfoExtractor), oauth2 (YoutubeTabIE)
[debug] Plugin directories: ['F:\\AInoriex-crawler_youtube_downloader\\.venv\\Lib\\site-packages\\yt_dlp_plugins']
[debug] Loaded 1829 extractors
[generic] Extracting URL: ./cache/yt-dlp_10
ERROR: [generic] './cache/yt-dlp_10' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:./cache/yt-dlp_10" ) to search YouTube
File "F:\AInoriex-crawler_youtube_downloader\.venv\Lib\site-packages\yt_dlp\extractor\common.py", line 740,
in extract
ie_result = self._real_extract(url)
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\AInoriex-crawler_youtube_downloader\.venv\Lib\site-packages\yt_dlp\extractor\generic.py", line 2358, in _real_extract
raise ExtractorError(
[youtube+oauth2] oauth2: Initializing OAuth2 Authorization Flow
[youtube+oauth2] To give yt-dlp access to your account, go to https://www.google.com/device and enter code TLDN-XXXX
First I execute the comand, and the result below: D:\py_project\crawler_youtube_downloader-master\venv\Scripts> yt-dlp -vU --username oauth2 --password '' [debug] Command-line config: ['-vU', '--username', 'PRIVATE', '--password', 'PRIVATE'] [debug] Home config "yt-dlp.conf": ['--username', 'PRIVATE', '--password', 'PRIVATE'] [debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (pip) [debug] Python 3.10.6 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1n 15 Mar 2022) [debug] exe versions: none [debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, mutagen-1.47.0, requests-2.32.3, sqlite3-3.37.2, urllib3-2.2.2, websockets-12.0 [debug] Proxy map: {} [debug] Request Handlers: urllib, requests, websockets [debug] Plugin directories: ['D:\py_project\crawler_youtube_downloader-master\venv\lib\site-packages\yt_dlp_plugins'] [debug] Loaded 1830 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Latest version: stable@2024.08.06 from yt-dlp/yt-dlp yt-dlp is up to date (stable@2024.08.06 from yt-dlp/yt-dlp)
But I can't find the device code. Can you give me more details, thank you.