ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.18k stars 9.93k forks source link

YouTube Non-adaptive format URL Gets 403 #31247

Open jka48013 opened 1 year ago

jka48013 commented 1 year ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--get-url', u'ZbZSe6N_BXs', u'--format', u'18', u'-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 2.7.16 (CPython) - Darwin-20.6.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}

Description

Hello there,

A decrypted YouTube URL can lead to 403 error randomly. For example, requesting "Audio + Video" mp4 URL of YouTube video ZbZSe6N_BXs then curl test connection:

for i in {1..100}
do
   url=$(youtube-dl --get-url ZbZSe6N_BXs --format 18)
   curl -Is $url | head -n 1
done

Out of that 100 repeated tests, there are usually less than 10 tests having broken connection (HTTP/1.1 403 Forbidden). Any thoughts?

dirkf commented 1 year ago

Each YT download link has a backup server encoded in its URL. YT switches to the backup server if the server in the host part of the URL gives 403 (possibly 404 too).

yt-dl doesn't (currently) use the backup server because of program architecture. The badness of the specified host in the download link is only discoverable when actually downloading. If YT download links were tested at extraction time (which would noticeably slow down the extraction, given the large number of formats offered), their validities might have changed by the time the download is initiated. But there is (currently) no mechanism for handling this fallback at download time; in particular, the failure might be detected by an external downloader over which yt-dl has no control.

See also #30990 for a related issue where YT's CDN servers fail to be updated consistently, and a relevant maxim

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

dirkf commented 1 year ago

We could add each backup server link with a lower preference so that it only gets selected when explicitly requested. But that's no help when the preferred URL has been returned with --get-url to be downloaded later.

pukkandan commented 1 year ago

Related https://github.com/yt-dlp/yt-dlp/issues/4100 https://github.com/yt-dlp/yt-dlp/issues/1986

dirkf commented 1 year ago

Especially https://github.com/yt-dlp/yt-dlp/issues/1986#issuecomment-1013307105.

dirkf commented 1 year ago

So perhaps a way to handle this problem, other than just sucking it up, would involve a custom downloader that understands the YT fallback server specification in the download URL? Or, as the specification is so specific, it could just be an escape in the normal downloaders?

dirkf commented 1 year ago

https://github.com/yt-dlp/yt-dlp/pull/5639

victorbiga commented 1 year ago

I came here from duplicate ticket and not sure the above subject is exactly related, but if the issue is in regards this error after downloading few

ERROR: unable to download video data: HTTP Error 403: Forbidden

then this is somehow related to youtube rate limiting and not youtube-dl

What DID NOT WORK for me:

youtube-dl  -o '%(title)s.%(ext)s' https://www.youtube.com/playlist\?list\=PLoQKfAob6SMy9RY1IYCwBu4nFdSjc7wDI -x --audio-format "mp3" --sleep-interval 5 -r "20k"

What WORKED for me:

youtube-dl  -o '%(title)s.%(ext)s' https://www.youtube.com/playlist\?list\=PLoQKfAob6SMy9RY1IYCwBu4nFdSjc7wDI -x --audio-format "mp3" --sleep-interval 5 -r "20k"

Adding --sleep-interval 5 for 5 seconds and limiting download rate to 20KBs -r "20k solved the problem and full playlist was able to successfully download without any errors.

RingoTheDog commented 1 year ago

(I think this is a similar issue, but please let me know if this should be a new issue....)

URL: "https://www.youtube.com/watch?v=kpGo2_d3oYE"

I tried adding --sleep-interval 5 -r "20k" as was suggested by victorbiga, however I continue to get errors.

C:\Transmogrifier>yt-dlp.py -v "https://www.youtube.com/watch?v=kpGo2_d3oYE" --sleep-interval 5 -r "20k"
[debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=kpGo2_d3oYE', '--sleep-interval', '5', '-r', '20k']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (zip)
[debug] Python 3.10.5 (CPython AMD64 64bit) - Windows-10-10.0.14393-SP0 (OpenSSL 1.1.1n  15 Mar 2022)
[debug] exe versions: ffmpeg 4.3.2-2021-02-02-full_build-www.gyan.dev, ffprobe 4.3.2-2021-02-02-full_build-www.gyan.dev, rtmpdump 2.4
[debug] Optional libraries: no_Cryptodome-None, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=kpGo2_d3oYE
[youtube] kpGo2_d3oYE: Downloading webpage
[youtube] kpGo2_d3oYE: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] kpGo2_d3oYE: Downloading 1 format(s): 248+251
[debug] Invoking dashsegments downloader on "https://rr6---sn-cxaaj5o5q5-tt1ed.googlevideo.com/videoplayback?expire=1685136932&ei=xNFwZNCeJbmDir4Pz_KzmAo&ip=199.85.73.12&id=o-ALT3oHtH09-UqwV9kTWCWIjJDw7550841OwitKDFj1yM&itag=248&source=youtube&requiressl=yes&mh=yW&mm=31%2C26&mn=sn-cxaaj5o5q5-tt1ed%2Csn-t0a7lnee&ms=au%2Conr&mv=m&mvi=6&pl=24&initcwndbps=1963750&spc=qEK7B6ABfu5taM8FE7dYxats8t0ujB4&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=24012672&dur=140.640&lmt=1681569236506708&mt=1685115172&fvip=3&keepalive=yes&fexp=24007246%2C51000012&c=ANDROID&txp=553D434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAK7m7xpJARwJfdNNL_hcse2MxvlZFPAkQWUjVN6HCzSnAiAL0yDyLQnn9TBaKg8qyMn8GMRkhu4CyxwNbyn1yXj4lA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhANQAGDpVUsNOoxYw-4WBNi360V3bUVkF8w2Re05XTQJ2AiEAyvMCLZNLJW9tQhWJB8jOWQO1RVljZ1jeCPDgl6qftK0%3D"
[download] Sleeping 5.00 seconds ...
[dashsegments] Total fragments: 3
[download] Destination: The Little Mermaid | Official Trailer [kpGo2_d3oYE].f248.webm
[debug] File locking is not supported. Proceeding without locking
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (1/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (2/10)...
[download] Got error: <urlopen error _ssl.c:980: The handshake operation timed out>. Retrying (3/10)...
[download] Got error: <urlopen error _ssl.c:980: The handshake operation timed out>. Retrying (4/10)...
[download] Got error: <urlopen error _ssl.c:980: The handshake operation timed out>. Retrying (5/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (6/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (7/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (8/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (9/10)...
[download] Got error: <urlopen error _ssl.c:980: The handshake operation timed out>. Retrying (10/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Giving up after 10 retries
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Transmogrifier\yt-dlp.py\__main__.py", line 17, in <module>
    yt_dlp.main()
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 967, in main
    _exit(*variadic(_real_main(argv)))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 957, in _real_main
    return ydl.download(all_urls)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3369, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3344, in wrapper
    res = func(*args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1507, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1615, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1674, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2779, in process_video_result
    self.process_info(new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3229, in process_info
    partial_success, real_download = self.dl(fname, new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2970, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\dash.py", line 60, in real_download
    return self.download_and_append_fragments_multiple(*args, is_fatal=lambda idx: idx == 0)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 382, in download_and_append_fragments_multiple
    return self.download_and_append_fragments(*args[0], **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 521, in download_and_append_fragments
    download_fragment(fragment, ctx)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 469, in download_fragment
    if not self._download_fragment(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 124, in _download_fragment
    success, _ = ctx['dl'].download(fragment_filename, fragment_info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\http.py", line 374, in real_download
    for retry in RetryManager(self.params.get('retries'), self.report_retry):
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\utils.py", line 6141, in __iter__
    self.error_callback(self.error, self.attempt, self.retries)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 389, in report_retry
    RetryManager.report_retry(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\utils.py", line 6148, in report_retry
    return error(f'{e}. Giving up after {count - 1} retries') if count > 1 else error(str(e))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 392, in <lambda>
    error=IDENTITY if not fatal else lambda e: self.report_error(f'\r[download] Got error: {e}'),
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1015, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 944, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

ERROR: fragment 1 not found, unable to continue
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Transmogrifier\yt-dlp.py\__main__.py", line 17, in <module>
    yt_dlp.main()
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 967, in main
    _exit(*variadic(_real_main(argv)))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 957, in _real_main
    return ydl.download(all_urls)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3369, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3344, in wrapper
    res = func(*args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1507, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1615, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1674, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2779, in process_video_result
    self.process_info(new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3229, in process_info
    partial_success, real_download = self.dl(fname, new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2970, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\dash.py", line 60, in real_download
    return self.download_and_append_fragments_multiple(*args, is_fatal=lambda idx: idx == 0)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 382, in download_and_append_fragments_multiple
    return self.download_and_append_fragments(*args[0], **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 522, in download_and_append_fragments
    result = append_fragment(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 486, in append_fragment
    self.report_error(f'fragment {frag_index} not found, unable to continue')
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1015, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 944, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

[debug] Invoking dashsegments downloader on "https://rr6---sn-cxaaj5o5q5-tt1ed.googlevideo.com/videoplayback?expire=1685136932&ei=xNFwZNCeJbmDir4Pz_KzmAo&ip=199.85.73.12&id=o-ALT3oHtH09-UqwV9kTWCWIjJDw7550841OwitKDFj1yM&itag=251&source=youtube&requiressl=yes&mh=yW&mm=31%2C26&mn=sn-cxaaj5o5q5-tt1ed%2Csn-t0a7lnee&ms=au%2Conr&mv=m&mvi=6&pl=24&initcwndbps=1963750&spc=qEK7B6ABfu5taM8FE7dYxats8t0ujB4&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=2225674&dur=140.661&lmt=1681560015639007&mt=1685115172&fvip=3&keepalive=yes&fexp=24007246%2C51000012&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgEPRAZHGjPedtW73q6m-lqmkpP2DwSUGBSgTECeRjeEkCIQCpa49I7Yj1Ih7jo8MNAxUo2IyufQf0LSMg_g_5qXIXsQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhANQAGDpVUsNOoxYw-4WBNi360V3bUVkF8w2Re05XTQJ2AiEAyvMCLZNLJW9tQhWJB8jOWQO1RVljZ1jeCPDgl6qftK0%3D"
[download] Sleeping 5.00 seconds ...
[dashsegments] Total fragments: 1
[download] Destination: The Little Mermaid | Official Trailer [kpGo2_d3oYE].f251.webm
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (1/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (2/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (3/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (4/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (5/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (6/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (7/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (8/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Retrying (9/10)...
[download] Got error: <urlopen error _ssl.c:980: The handshake operation timed out>. Retrying (10/10)...
[download] Got error: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>. Giving up after 10 retries
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Transmogrifier\yt-dlp.py\__main__.py", line 17, in <module>
    yt_dlp.main()
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 967, in main
    _exit(*variadic(_real_main(argv)))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 957, in _real_main
    return ydl.download(all_urls)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3369, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3344, in wrapper
    res = func(*args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1507, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1615, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1674, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2779, in process_video_result
    self.process_info(new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3229, in process_info
    partial_success, real_download = self.dl(fname, new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2970, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\dash.py", line 60, in real_download
    return self.download_and_append_fragments_multiple(*args, is_fatal=lambda idx: idx == 0)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 382, in download_and_append_fragments_multiple
    return self.download_and_append_fragments(*args[0], **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 521, in download_and_append_fragments
    download_fragment(fragment, ctx)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 469, in download_fragment
    if not self._download_fragment(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 124, in _download_fragment
    success, _ = ctx['dl'].download(fragment_filename, fragment_info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\http.py", line 374, in real_download
    for retry in RetryManager(self.params.get('retries'), self.report_retry):
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\utils.py", line 6141, in __iter__
    self.error_callback(self.error, self.attempt, self.retries)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 389, in report_retry
    RetryManager.report_retry(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\utils.py", line 6148, in report_retry
    return error(f'{e}. Giving up after {count - 1} retries') if count > 1 else error(str(e))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 392, in <lambda>
    error=IDENTITY if not fatal else lambda e: self.report_error(f'\r[download] Got error: {e}'),
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1015, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 944, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

ERROR: fragment 1 not found, unable to continue
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\TRANSMOG\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Transmogrifier\yt-dlp.py\__main__.py", line 17, in <module>
    yt_dlp.main()
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 967, in main
    _exit(*variadic(_real_main(argv)))
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\__init__.py", line 957, in _real_main
    return ydl.download(all_urls)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3369, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3344, in wrapper
    res = func(*args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1507, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1615, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1674, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2779, in process_video_result
    self.process_info(new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 3229, in process_info
    partial_success, real_download = self.dl(fname, new_info)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 2970, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\dash.py", line 60, in real_download
    return self.download_and_append_fragments_multiple(*args, is_fatal=lambda idx: idx == 0)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 382, in download_and_append_fragments_multiple
    return self.download_and_append_fragments(*args[0], **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 522, in download_and_append_fragments
    result = append_fragment(
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\downloader\fragment.py", line 486, in append_fragment
    self.report_error(f'fragment {frag_index} not found, unable to continue')
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 1015, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Transmogrifier\yt-dlp.py\yt_dlp\YoutubeDL.py", line 944, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
Vangelis66 commented 1 year ago

@RingoTheDog posted:

if this should be a new issue ...

[debug] yt-dlp version stable@2023.03.04 [392389b7d] (zip)

i.e. you're using the downstream fork (yt-dlp), not youtube-dl 😠 ; whatever "issue" besets you while using yt-dlp, please post about it at their own tracker 😉 ...

In the future, should you wish to post in the youtube-dl issue tracker, please first review pinned issue #30839, which specifically contains below clause:

If you were actually running yt-dlp, go there. Similarly with other forks,

FWIW, I don't see any "403" errors in your posted yt-dlp debug log; latest youtube-dl (built from master HEAD) has no issue fetching the video in your log:

yt-dl -vf "248+251" "kpGo2_d3oYE" => 

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ffmpeg-location', '.\\FFmpeg', '--external-downloader-args', '-v 8 -stats', '-vf', '248+251', 'kpGo2_d3oYE']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2023.05.25.19419 (single file build)
[debug] Python 3.4.4 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 - OpenSSL 1.0.2d 9 Jul 2015
[debug] exe versions: ffmpeg n6.1-dev-804-N-110688-g1aeefc4, ffprobe n6.1-dev-804-N-110688-g1aeefc4, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] kpGo2_d3oYE: Downloading webpage
[debug] [youtube] Decrypted nsig J5f8LmIFSnlTzBRArn => v32P9oMfh53TPw
[debug] [youtube] Decrypted nsig qAlQJO00fKLQ6wGQCh => _7IPbUjWpfy2og
[debug] Invoking downloader on 'https://rr1---sn-4vguioxu-n3bz.googlevideo.com/videoplayback?source=youtube&clen=24012672&dur=140.640&sig=AOq0QJ8wRAIgA3pfmTk_Lyf9zwejFp0R3oSNnqn_2Aa9cl9Z00JVzWkCIB_c0Eo638bxCPwWOoP8lZtwpV-nq-_cBkK3hcVWpNK0&ei=wOVwZNb-H4bYgAf1qIvwBg&pl=20&pcm2cms=yes&mn=sn-4vguioxu-n3bz%2Csn-nv47lns7&fexp=24007246&fvip=3&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&beids=24350017&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&expire=1685142048&mt=1685120209&mv=m&itag=248&mm=31%2C29&id=o-ABFWlKQlFJF4QbiazOLrqPhJmooDO7Rc76LKtJrtCxWr&lsig=AG3C_xAwRgIhAIzfoXHyIs4xrwWj0FFxlIkYAR-wA3cbEnXX3Ix5jHKGAiEA6xilelA_ls1-qXP63mJ-gIU73I4er-tPgUfK5iq-8ko%3D&svpuc=1&txp=553D434&lmt=1681569236506708&ip=<redacted>&ns=FiNCOg2S-TTaUJMJdTwqnRAN&gir=yes&initcwndbps=716250&mvi=1&keepalive=yes&mime=video%2Fwebm&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&ms=au%2Crdu&c=WEB&requiressl=yes&mh=yW&vprv=1&n=v32P9oMfh53TPw'
[dashsegments] Total fragments: 3
[download] Destination: The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f248.webm
[download] 100% of 22.90MiB in 00:17
[debug] Invoking downloader on 'https://rr1---sn-4vguioxu-n3bz.googlevideo.com/videoplayback?source=youtube&clen=2225674&dur=140.661&sig=AOq0QJ8wRgIhALRfBT45BMxSXPwdUHiW79GB_ZG6M0UXSIgY18K2M0YUAiEA5U5TWh8fXad4YYU_E3Hg2n68rNIonUxE9IStbVkU7TQ%3D&ei=wOVwZNb-H4bYgAf1qIvwBg&pl=20&pcm2cms=yes&mn=sn-4vguioxu-n3bz%2Csn-nv47lns7&fvip=3&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&beids=24350017&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&expire=1685142048&mt=1685120209&mv=m&itag=251&mm=31%2C29&id=o-ABFWlKQlFJF4QbiazOLrqPhJmooDO7Rc76LKtJrtCxWr&lsig=AG3C_xAwRgIhAIzfoXHyIs4xrwWj0FFxlIkYAR-wA3cbEnXX3Ix5jHKGAiEA6xilelA_ls1-qXP63mJ-gIU73I4er-tPgUfK5iq-8ko%3D&svpuc=1&txp=5532434&lmt=1681560015639007&ip=<redacted>&ns=FiNCOg2S-TTaUJMJdTwqnRAN&gir=yes&initcwndbps=716250&mvi=1&keepalive=yes&mime=audio%2Fwebm&fexp=24007246&ms=au%2Crdu&c=WEB&requiressl=yes&mh=yW&vprv=1&n=v32P9oMfh53TPw'
[dashsegments] Total fragments: 1
[download] Destination: The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f251.webm
[download] 100% of 2.12MiB in 00:01
[ffmpeg] Merging formats into "The Little Mermaid _ Official Trailer-kpGo2_d3oYE.webm"
[debug] ffmpeg command line: ".\FFmpeg\ffmpeg" -y -loglevel "repeat+info" -i "file:The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f248.webm" -i "file:The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f251.webm" -c copy -map "0:v:0" -map "1:a:0" "file:The Little Mermaid _ Official Trailer-kpGo2_d3oYE.temp.webm"
Deleting original file The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f248.webm (pass -k to keep)
Deleting original file The Little Mermaid _ Official Trailer-kpGo2_d3oYE.f251.webm (pass -k to keep)