yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
85.33k stars 6.66k forks source link

https://www.bilibili.tv/en/video/2049426983 #6908

Closed WoodpeckerBaby closed 1 year ago

WoodpeckerBaby commented 1 year ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Region

Canada

Example URLs

https://www.bilibili.tv/en/video/2049426983

Provide a description that is worded well enough to be understood

^ as is

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

yt-dlp -vU https://www.bilibili.tv/en/video/2049426983

[debug] Command-line config: ['-vU', 'https://www.bilibili.tv/en/video/2049426983']
[debug] User config "/Users/williamzwang/.config/yt-dlp/config": ['--downloader', 'aria2c', '--downloader-args', '-s 16 -x 16 -j 4 -k 1M', '--download-archive', 'archive.txt', '--ignore-errors', '--ffmpeg-location', '/usr/local/bin/ffmpeg', '--add-metadata', '--embed-thumbnail', '--xattrs', '--embed-subs', '--console-title', '--merge-output-format', 'mkv', '--sponsorblock-remove', 'all']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (pip)
[debug] Python 3.10.11 (CPython x86_64 64bit) - macOS-13.3.1-x86_64-i386-64bit (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
WARNING: External Downloader arguments given without specifying name. The arguments will be given to aria2c
[debug] Loaded 1786 extractors
[debug] Loading archive file 'archive.txt'
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
yt-dlp is up to date (stable@2023.03.04)
[BiliIntl] Extracting URL: https://www.bilibili.tv/en/video/2049426983
[BiliIntl] 2049426983: Downloading webpage
[BiliIntl] 2049426983: Downloading video formats
[BiliIntl] 2049426983: Downloading subtitles list
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[SponsorBlock] SponsorBlock is not supported for BiliIntl
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 2049426983: Downloading 1 format(s): 7+2
[info] There's no subtitles for the requested languages
Deleting existing file No Reservations (2007) - Bilibili [2049426983].jpg
[info] Downloading video thumbnail 0 ...
[info] Writing video thumbnail 0 to: No Reservations (2007) - Bilibili [2049426983].jpg
[debug] Invoking aria2c downloader on "https://upos-sz-mirrorcosbstar1.bilivideo.com/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-141210110000.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1682408030&gen=playurlv2&os=cosbstar1bv&oi=401434242&trid=0a415bc5e0774021be136f675ea46c26i&mid=0&platform=pc&upsig=367e65bcc7ef925bbe2fd799d96a1fb4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&bvc=vod&nettype=0&orderid=0,2&logo=00000000"
[download] Destination: No Reservations (2007) - Bilibili [2049426983].f7.mp4
[debug] aria2c command line: aria2c -c --console-log-level=warn --summary-interval=0 --download-result=hide --http-accept-gzip=true --file-allocation=none -x16 -j16 -s16 --min-split-size 1M --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-us,en;q=0.5' --header 'Sec-Fetch-Mode: navigate' --check-certificate=true --remote-time=true --show-console-readout=true -s 16 -x 16 -j 4 -k 1M --out './No Reservations (2007) - Bilibili [2049426983].f7.mp4.part' --auto-file-renaming=false -- 'https://upos-sz-mirrorcosbstar1.bilivideo.com/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-141210110000.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1682408030&gen=playurlv2&os=cosbstar1bv&oi=401434242&trid=0a415bc5e0774021be136f675ea46c26i&mid=0&platform=pc&upsig=367e65bcc7ef925bbe2fd799d96a1fb4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&bvc=vod&nettype=0&orderid=0,2&logo=00000000'

04/25 01:33:53 [ERROR] CUID#7 - Download aborted. URI=https://upos-sz-mirrorcosbstar1.bilivideo.com/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-141210110000.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1682408030&gen=playurlv2&os=cosbstar1bv&oi=401434242&trid=0a415bc5e0774021be136f675ea46c26i&mid=0&platform=pc&upsig=367e65bcc7ef925bbe2fd799d96a1fb4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&bvc=vod&nettype=0&orderid=0,2&logo=00000000
Exception: [AbstractCommand.cc:351] errorCode=22 URI=https://upos-sz-mirrorcosbstar1.bilivideo.com/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-141210110000.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1682408030&gen=playurlv2&os=cosbstar1bv&oi=401434242&trid=0a415bc5e0774021be136f675ea46c26i&mid=0&platform=pc&upsig=367e65bcc7ef925bbe2fd799d96a1fb4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&bvc=vod&nettype=0&orderid=0,2&logo=00000000
  -> [HttpSkipResponseCommand.cc:240] errorCode=22 The response status is not successful. status=403

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

ERROR: aria2c exited with code 22
  File "/usr/local/bin/yt-dlp", line 8, in <module>
    sys.exit(main())
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/__init__.py", line 967, in main
    _exit(*variadic(_real_main(argv)))
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/__init__.py", line 957, in _real_main
    return ydl.download(all_urls)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3369, in download
    self.__download_wrapper(self.extract_info)(
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3344, in wrapper
    res = func(*args, **kwargs)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1507, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1615, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1674, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 2779, in process_video_result
    self.process_info(new_info)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3229, in process_info
    partial_success, real_download = self.dl(fname, new_info)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 2970, in dl
    return fd.download(name, new_info, subtitle)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/downloader/common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/downloader/external.py", line 76, in real_download
    self.report_error('%s exited with code %d' % (
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1015, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/usr/local/Cellar/yt-dlp/2023.3.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 944, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

[debug] Invoking aria2c downloader on "https://upos-bstar1-mirrorakam.akamaized.net/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-1c1301000023.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1682408030&gen=playurlv2&os=akam&oi=401434242&trid=0a415bc5e0774021be136f675ea46c26i&mid=0&platform=pc&upsig=72fabf0b7bb230c3e78699da59164cd2&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&hdnts=exp=1682408030~hmac=fd1ce64ce07deb0cff606e52734a46ee81df53667820419788076b18751c38b6&bvc=vod&nettype=0&orderid=0,2&logo=00000000"
[download] No Reservations (2007) - Bilibili [2049426983].f2.mp4 has already been downloaded
[download] 100% of   63.93MiB
ThomasChr commented 1 year ago

Can't recreate from germany

WoodpeckerBaby commented 1 year ago

Can't recreate from germany

Do you mean you can download successfully?

ThomasChr commented 1 year ago

Exactly. Without any problems.

gamer191 commented 1 year ago

@thomaschr are you using Aria2c?

ThomasChr commented 1 year ago

I just copied your command line. Possible that I‘m not using it. How can I use it?

gamer191 commented 1 year ago

I just copied your command line. Possible that I‘m not using it. How can I use it?

Don't worry about it, I can test it since it works by default for me as well

gamer191 commented 1 year ago

I can't reproduce this. @WoodpeckerBaby can you please test:

  1. whether you can still reproduce this
  2. if you can, whether you can reproduce this with --ignore-config
  3. if you can't, please test whether you can reproduce this after updating aria2c
  4. please find another URL that you can reproduce this on, because I just noticed the example url is a pirated movie
dirkf commented 1 year ago

From UK, -f worstvideo with the native downloader downloads 4MB and then closes any subsequent connection attempts.

...
[debug] Invoking http downloader on "https://upos-bstar1-mirrorakam.akamaized.net/iupxcodeboss/1b/pz/n230217ad42k8w8mmk2yx1c448ljpz1b-1-1f1210110000.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1683818036&gen=playurlv2&os=akam&oi=785385054&trid=13627205c25b4a77b96d3a114ace2c05i&mid=0&platform=pc&upsig=cf3f1a1571827168a7f772f0d345010e&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&hdnts=exp=1683818036~hmac=283af68a1859325caa619f80c20215008b9b050398c1475d5d8a625ba17a4ef5&bvc=vod&nettype=0&orderid=0,1&logo=00000000"
[download] Resuming download at byte 4194304
[download] Got error: Remote end closed connection without response. Retrying (1/10)...
...

aria2c says:

Exception: [HttpConnection.cc:156] errorCode=1 Got EOF from the server.

So this can fail in several ways.

WoodpeckerBaby commented 1 year ago

I can confirm that this is a source access policy issue. They are blocking based on IP or AS for abuse, and also based on country due to licensing issues.

Bilibili is a legit Chinese site, I don't think it's piracy. They license movies.

I VPN'ed to Singapore and it worked, but not in Canada.