Closed HalvorRaknes closed 2 years ago
- [X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
You did not quote your URL in 2nd attempt etc
In your "first attempt", you specifically passed the URL of "/featured" tab. So yt-dlp attempted to download the videos in that tab. Since none of the videos in that page satisfied your conditions, nothing was downloaded. If you want to download the whole channel, remove /featured
from the URL
In the second attempt I simply passed the URL of the channel. I did that simply to see if that would work when nothing else would.
Here is the output of the "first attempt" modified as you requested:
$ yt-dlp -uv --cookies-from-browser brave -f 18 --datebefore 20211031 --dateafter 20211025 https://www.youtube.com/c/AlexanderMercourisReal/
Type account password and press [Return]:
[Cookies] Extracting cookies from brave
Traceback (most recent call last):
File "/usr/bin/yt-dlp", line 11, in <module>
load_entry_point('yt-dlp==2021.12.27', 'console_scripts', 'yt-dlp')()
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 843, in main
_real_main(argv)
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 802, in _real_main
with YoutubeDL(ydl_opts) as ydl:
File "/usr/lib/python3/dist-packages/yt_dlp/YoutubeDL.py", line 632, in __init__
self._setup_opener()
File "/usr/lib/python3/dist-packages/yt_dlp/YoutubeDL.py", line 3582, in _setup_opener
self.cookiejar = load_cookies(opts_cookiefile, opts_cookiesfrombrowser, self)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 76, in load_cookies
cookie_jars.append(extract_cookies_from_browser(browser_name, profile, YDLLogger(ydl), keyring=keyring))
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 94, in extract_cookies_from_browser
return _extract_chrome_cookies(browser_name, profile, keyring, logger)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 235, in _extract_chrome_cookies
decryptor = get_cookie_decryptor(config['browser_dir'], config['keyring_name'], logger, keyring=keyring)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 319, in get_cookie_decryptor
return LinuxChromeCookieDecryptor(browser_keyring_name, logger, keyring=keyring)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 333, in __init__
password = _get_linux_keyring_password(browser_keyring_name, keyring, logger)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 793, in _get_linux_keyring_password
keyring = _LinuxKeyring[keyring] or _choose_linux_keyring(logger)
File "/usr/lib/python3.8/enum.py", line 387, in __getitem__
return cls._member_map_[name]
KeyError: None
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_yt-dlp.1000.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/yt-dlp", line 11, in <module>
load_entry_point('yt-dlp==2021.12.27', 'console_scripts', 'yt-dlp')()
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 843, in main
_real_main(argv)
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 802, in _real_main
with YoutubeDL(ydl_opts) as ydl:
File "/usr/lib/python3/dist-packages/yt_dlp/YoutubeDL.py", line 632, in __init__
self._setup_opener()
File "/usr/lib/python3/dist-packages/yt_dlp/YoutubeDL.py", line 3582, in _setup_opener
self.cookiejar = load_cookies(opts_cookiefile, opts_cookiesfrombrowser, self)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 76, in load_cookies
cookie_jars.append(extract_cookies_from_browser(browser_name, profile, YDLLogger(ydl), keyring=keyring))
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 94, in extract_cookies_from_browser
return _extract_chrome_cookies(browser_name, profile, keyring, logger)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 235, in _extract_chrome_cookies
decryptor = get_cookie_decryptor(config['browser_dir'], config['keyring_name'], logger, keyring=keyring)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 319, in get_cookie_decryptor
return LinuxChromeCookieDecryptor(browser_keyring_name, logger, keyring=keyring)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 333, in __init__
password = _get_linux_keyring_password(browser_keyring_name, keyring, logger)
File "/usr/lib/python3/dist-packages/yt_dlp/cookies.py", line 793, in _get_linux_keyring_password
keyring = _LinuxKeyring[keyring] or _choose_linux_keyring(logger)
File "/usr/lib/python3.8/enum.py", line 387, in __getitem__
return cls._member_map_[name]
KeyError: None
looks like something's wrong with --cookies-from-browser
.
You mistyped -Uv
as -uv
. So the verbose part of the log is not visible. Can you provide the actual verbose log?
yt-dlp -v --cookies-from-browser brave https://www.youtube.com/c/AlexanderMercourisReal
You can also try without --cookies-from-browser
to make sure that is in fact the issue
Actually, I just noticed - the issue with cookies-from-browser is #2167, which is fixed already, but not released yet
OK, here's what you request:
$ yt-dlp -v https://www.youtube.com/c/AlexanderMercourisReal
[debug] Command-line config: ['-v', 'https://www.youtube.com/c/AlexanderMercourisReal']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8]
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-94-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube:tab] Extracting URL: https://www.youtube.com/c/AlexanderMercourisReal
[youtube:tab] AlexanderMercourisReal: Downloading webpage
WARNING: [youtube:tab] A channel/user page was given. All the channel's videos will be downloaded. To download only the videos in the home page, add a "/featured" to the URL
[debug] [youtube:tab] Final URL: https://www.youtube.com/c/AlexanderMercourisReal/videos
[download] Downloading playlist: Alexander Mercouris - Videos
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 1: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 2: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 3: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 4: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 5: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 6: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 7: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 8: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 9: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 10: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 11: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 12: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 13: Downloading API JSON
[youtube:tab] playlist Alexander Mercouris - Videos: Downloading 396 videos
[download] Downloading video 1 of 396
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=c3Y47pkTXXk
[youtube] c3Y47pkTXXk: Downloading webpage
[youtube] c3Y47pkTXXk: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] c3Y47pkTXXk: Downloading 1 format(s): 247+251
[debug] Invoking downloader on "https://rr6---sn-uxaxovg-vnae7.googlevideo.com/videoplayback?expire=1642278828&ei=TNviYcnvNIyZyQX2_KXICw&ip=171.23.6.112&id=o-ABFoYgmAGu2EUDgN-RuDJt2gj7wlvUxa6cKzdoI3OKaV&itag=247&source=youtube&requiressl=yes&mh=Fn&mm=31%2C29&mn=sn-uxaxovg-vnae7%2Csn-5go7yne6&ms=au%2Crdu&mv=m&mvi=6&pl=16&initcwndbps=2950000&vprv=1&mime=video%2Fwebm&gir=yes&clen=144499846&dur=3217.791&lmt=1642246548858418&mt=1642256938&fvip=6&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5535434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAJV2GlQbG9zXbno_-UTzEo2jPuS9nlqPIUWlYFnm6DM-AiEAx3U90_sqKohM8s1NCNA_wuH35vuyRlsTMN8eWIxjM9o%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgb_4bIVMydTGBPxc4UjeFDLW2CxL60mK4ymKPlmUVd5MCIQCuaFl2eFcbax5e4UavNiCpIiBucypgX49KTW5v0MuhWA%3D%3D"
[download] Destination: US Struggles to Respond to Russia, Uses Filibuster it Opposes to Block Sanctions on Nord Stream 2 [c3Y47pkTXXk].f247.webm
[download] 59.3% of 137.81MiB at 2.70MiB/s ETA 00:20^C
ERROR: Interrupted by user
But here's what I get with the two --datebefore
and --dateafter
:
$ yt-dlp -v --datebefore 20211041 --dateafter 20211025 https://www.youtube.com/c/AlexanderMercourisReal
[debug] Command-line config: ['-v', '--datebefore', '20211041', '--dateafter', '20211025', 'https://www.youtube.com/c/AlexanderMercourisReal']
Traceback (most recent call last):
File "/usr/bin/yt-dlp", line 11, in <module>
load_entry_point('yt-dlp==2021.12.27', 'console_scripts', 'yt-dlp')()
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 843, in main
_real_main(argv)
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 292, in _real_main
date = DateRange(opts.dateafter, opts.datebefore)
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1822, in __init__
self.end = date_from_str(end)
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1772, in date_from_str
return datetime_from_str(date_str, precision='microsecond', format=format).date()
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1762, in datetime_from_str
return datetime_round(datetime.datetime.strptime(date_str, format), precision)
File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.8/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: 1
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_yt-dlp.1000.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/yt-dlp", line 11, in <module>
load_entry_point('yt-dlp==2021.12.27', 'console_scripts', 'yt-dlp')()
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 843, in main
_real_main(argv)
File "/usr/lib/python3/dist-packages/yt_dlp/__init__.py", line 292, in _real_main
date = DateRange(opts.dateafter, opts.datebefore)
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1822, in __init__
self.end = date_from_str(end)
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1772, in date_from_str
return datetime_from_str(date_str, precision='microsecond', format=format).date()
File "/usr/lib/python3/dist-packages/yt_dlp/utils.py", line 1762, in datetime_from_str
return datetime_round(datetime.datetime.strptime(date_str, format), precision)
File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.8/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: 1
halvor@halvor-X551MA:~/Downloads/Duran/Alexander Mercouris$ yt-dlp -v --datebefore 20211031 --dateafter 20211025 https://www.youtube.com/c/AlexanderMercourisReal
[debug] Command-line config: ['-v', '--datebefore', '20211031', '--dateafter', '20211025', 'https://www.youtube.com/c/AlexanderMercourisReal']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8]
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-94-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube:tab] Extracting URL: https://www.youtube.com/c/AlexanderMercourisReal
[youtube:tab] AlexanderMercourisReal: Downloading webpage
WARNING: [youtube:tab] A channel/user page was given. All the channel's videos will be downloaded. To download only the videos in the home page, add a "/featured" to the URL
[debug] [youtube:tab] Final URL: https://www.youtube.com/c/AlexanderMercourisReal/videos
[download] Downloading playlist: Alexander Mercouris - Videos
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 1: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 2: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 3: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 4: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 5: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 6: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 7: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 8: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 9: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 10: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 11: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 12: Downloading API JSON
[youtube:tab] UCwGpHa6rMLjSSCBlckm5khw page 13: Downloading API JSON
[youtube:tab] playlist Alexander Mercouris - Videos: Downloading 396 videos
[download] Downloading video 1 of 396
[download] 2022-01-14 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 2 of 396
[download] 2022-01-15 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 3 of 396
[download] 2022-01-13 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 4 of 396
[download] 2022-01-12 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 5 of 396
[download] 2022-01-11 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 6 of 396
[download] 2022-01-10 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 7 of 396
[download] 2022-01-09 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 8 of 396
[download] 2022-01-08 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 9 of 396
[download] 2022-01-07 upload date is not in range 2021-10-25 - 2021-10-31
.
(numerous lines deleted)
.
[download] Downloading video 387 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 388 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 389 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 390 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 391 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 392 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 393 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 394 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 395 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Downloading video 396 of 396
[download] 2021-01-16 upload date is not in range 2021-10-25 - 2021-10-31
[download] Finished downloading playlist: Alexander Mercouris - Videos
@coletdjnz issue due to #1018
OK. Since that page is gobbledygook to lay person me, could you just tell me if this is in the works? Is it a problem that will be fixed? With priority? Can you estimate if it will be fixed soon?
I'm not trying to be pushy or impolite, so please have patience… :-)
That comment was for coledjnz because it was one of his PRs that introduced this issue
Is it a problem that will be fixed?
Sorry, I forgot to re-open this... Yes. this is a valid issue
With priority? Can you estimate if it will be fixed soon?
There is an easy fix (ie, partially revert the PR), though that will break some other (less important) functionality. If we are unable to come up with a proper solution before next release, I will do that instead.
Appreciated!
Checklist
Region
Norway
Description
I am attempting to download all files in a 7 day time interval from a YouTube channel from which I have done the same several times in the past. Now it consistently fails. Four approaches are shown here:
On the last three attempts the prompt is returned with a blinking cursor, however, pressing 'enter' brings out another line of output, including the "stopped"
Verbose log