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

[Billibilli] Some downloads broken #838

Closed
pukkandan opened this issue Aug 31, 2021 Discussed in #837 · 2 comments
Closed

[Billibilli] Some downloads broken #838

pukkandan opened this issue Aug 31, 2021 Discussed in #837 · 2 comments
Labels
help-wanted Extra attention is needed site-bug Issue with a specific website

Comments

@pukkandan
Copy link
Member

Issue created from #837

Originally posted by anlsh August 31, 2021
I've been trying to download this playlist via youtube-dlp.

Running yt-dlp https://www.bilibili.com/video/BV1Nf4y1179V worked fine for most of them, but a few only downloaded partially. My attempts to download those specific videos individually have failed repeatedly, and I'm wondering what's going on here.

For instance, running

$ yt-dlp https://www.bilibili.com/video/BV1Nf4y1179V?p=18

always produces something like the following output at a relatively consistent point in the download, about 10 seconds in

[debug] Command-line config: ['https://www.bilibili.com/video/BV1Nf4y1179V?p=18', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] yt-dlp version 2021.08.10 (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-7642-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Optional libraries: keyring, pycryptodome, sqlite
[debug] Proxy map: {}
[debug] [BiliBili] Extracting URL: https://www.bilibili.com/video/BV1Nf4y1179V?p=18
[BiliBili] 1Nf4y1179V: Grabbing original ID via API
[BiliBili] 286127234: Downloading webpage
[BiliBili] 286127234: Downloading video info page
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[BiliBili] 286127234: Extracting videos in anthology
[BiliBili] 286127234: Downloading danmaku comments
[BiliBili] 286127234: Downloading tags
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 286127234_p18: Downloading 1 format(s): 0
[debug] Invoking downloader on "http://upos-hz-mirrorakam.akamaized.net/upgcxcode/53/88/240998853/240998853-1-64.flv?e=ig8euxZM2rNcNbR17WdVhoM1hWUVhwdEto8g5X10ugNcXBlqNxHxNEVE5XREto8KqJZHUa6m5J0SqE85tZvEuENvNC8xNEVE9EKE9IMvXBvE2ENvNCImNEVEK9GVqJIwqa80WXIekXRE9IMvXBvEuENvNCImNEVEua6m2jIxux0CkF6s2JZv5x0DQJZY2F8SkXKE9IB5QK==&deadline=1630376222&gen=playurl&nbs=1&oi=764441054&os=akam&platform=pc&trid=b806d2a250574f0badedd3f1f3349f86&uipk=5&upsig=ddaeea00d065e655ffae098f2bd07d9d&uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk&hdnts=exp=1630376222~hmac=89e986096ac0287b3f1f2fa7cdfac5f4fb48e7e4df89929386a4ca37cd807872&mid=0"
[download] Resuming download at byte 4194304
ERROR: unable to download video data: Remote end closed connection without response
Traceback (most recent call last):
  File "../yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 2774, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "../yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 2438, in dl
    return fd.download(name, new_info, subtitle)
  File "../yt-dlp/yt-dlp/yt_dlp/downloader/common.py", line 386, in download
    return self.real_download(filename, info_dict), True
  File "../yt-dlp/yt-dlp/yt_dlp/downloader/http.py", line 366, in real_download
    establish_connection()
  File "../yt-dlp/yt-dlp/yt_dlp/downloader/http.py", line 112, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "../yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3190, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "../yt-dlp/yt-dlp/yt_dlp/utils.py", line 2668, in http_open
    return self.do_open(functools.partial(
  File "/usr/lib/python3.8/urllib/request.py", line 1358, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

Video IDs 12, 20, and 22 produce similar results, whereas the other IDs seem to have passed just fine. Can anyone reproduce this and/or diagnose the problem?

@pukkandan pukkandan added the site-bug Issue with a specific website label Aug 31, 2021
@pukkandan
Copy link
Member Author

pukkandan commented Aug 31, 2021

@anlsh Yes, I can reproduce the issue

@pukkandan pukkandan added the help-wanted Extra attention is needed label Sep 19, 2021
@lockmatrix
Copy link
Contributor

lockmatrix commented Jun 26, 2022

I test it on yt-dlp 2022.06.22.1,
it works.

yt-dlp https://www.bilibili.com/video/BV1Nf4y1179V?p=18

[BiliBili] 1Nf4y1179V: Grabbing original ID via API
[BiliBili] 286127234: Downloading webpage
[BiliBili] 286127234: Extracting videos in anthology
[BiliBili] 286127234: Downloading tags
[info] 286127234_part18: Downloading 1 format(s): 15+2
[download] Destination: MIT 6.004 L19- Pipelined Processors [286127234_part18].f15.mp4
[download] 100% of 82.01MiB in 00:05
[download] Destination: MIT 6.004 L19- Pipelined Processors [286127234_part18].f2.m4a
[download] 100% of 45.27MiB in 00:01
[Merger] Merging formats into "MIT 6.004 L19- Pipelined Processors [286127234_part18].mp4"
Deleting original file MIT 6.004 L19- Pipelined Processors [286127234_part18].f15.mp4 (pass -k to keep)
Deleting original file MIT 6.004 L19- Pipelined Processors [286127234_part18].f2.m4a (pass -k to keep)

I think this issue can be closed.
@pukkandan @anlsh

Maybe it needs an VPN in mainland China.

@pukkandan pukkandan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Extra attention is needed site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

2 participants