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
132.23k stars 10.03k forks source link

Bilibili - Unable to download majority of videos #25891

Closed bjsm19 closed 4 years ago

bjsm19 commented 4 years ago

Checklist

Verbose log

C:\Users\User>youtube-dl -v https://www.bilibili.com/video/BV1xW411K7Ko
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.bilibili.com/video/BV1xW411K7Ko']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.8.3 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg git-2020-05-27-8b5ffae, ffprobe git-2020-05-27-8b5ffae
[debug] Proxy map: {}
[BiliBili] 1xW411K7Ko: Downloading webpage
[BiliBili] 1xW411K7Ko: Downloading video info page
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://upos-hz-mirrorakam.akamaized.net/upgcxcode/89/57/36075789/36075789_da2-1-32.flv?e=ig8euxZM2rNcNbNahbUVhoMg7zNBhwdEto8g5X10ugNcXBlqNxHxNEVE5XREto8KqJZHUa6m5J0SqE85tZvEuENvNC8xNEVE9EKE9IMvXBvE2ENvNCImNEVEK9GVqJIwqa80WXIekXRE9IMvXBvEuENvNCImNEVEua6m2jIxux0CkF6s2JZv5x0DQJZY2F8SkXKE9IB5QK==&deadline=1593878617&gen=playurl&nbs=1&oi=1892137221&os=akam&platform=pc&trid=588c7a80fc3248b6aa75be38ccbd525a&uipk=5&upsig=085622ba8435faef75c6507359f1d430&uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk&hdnts=exp=1593878617~hmac=b59e74feb3d05b1e774e0e6d532d61820a0d09ff8ced2ec9b9cb749bcfb73317&mid=0'
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]   5.4% of 1.08GiB at 676.31KiB/s ETA 26:19[download] Got server HTTP error: Downloaded 62914560 bytes, expected 1156656368 bytes. Retrying (attempt 1 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]   5.8% of 1.08GiB at  1.43MiB/s ETA 12:07         [download] Got server HTTP error: Downloaded 67108864 bytes, expected 1156656368 bytes. Retrying (attempt 2 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]   7.6% of 1.08GiB at 589.64KiB/s ETA 29:29        [download] Got server HTTP error: Downloaded 88080384 bytes, expected 1156656368 bytes. Retrying (attempt 3 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]   9.1% of 1.08GiB at 475.24KiB/s ETA 36:01        [download] Got server HTTP error: Downloaded 104857600 bytes, expected 1156656368 bytes. Retrying (attempt 4 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]  12.7% of 1.08GiB at 654.36KiB/s ETA 25:07        [download] Got server HTTP error: Downloaded 146800640 bytes, expected 1156656368 bytes. Retrying (attempt 5 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]  13.1% of 1.08GiB at  1.88MiB/s ETA 08:29         [download] Got server HTTP error: Downloaded 150994944 bytes, expected 1156656368 bytes. Retrying (attempt 6 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]  13.4% of 1.08GiB at  1.02MiB/s ETA 15:36         [download] Got server HTTP error: Downloaded 155189248 bytes, expected 1156656368 bytes. Retrying (attempt 7 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]  13.8% of 1.08GiB at  1.72MiB/s ETA 09:14         [download] Got server HTTP error: Downloaded 159383552 bytes, expected 1156656368 bytes. Retrying (attempt 8 of 10)...
[download] Destination: 3rd関東立海全景映像-1xW411K7Ko.flv
[download]  15.6% of 1.08GiB at 717.73KiB/s ETA 22:08        [download] Got server HTTP error: Downloaded 180355072 bytes, expected 1156656368 bytes. Retrying (attempt 9 of 10)...
ERROR: unable to download video data: Remote end closed connection without response
Traceback (most recent call last):
  File "c:\python\lib\site-packages\youtube_dl\YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "c:\python\lib\site-packages\youtube_dl\YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "c:\python\lib\site-packages\youtube_dl\downloader\common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "c:\python\lib\site-packages\youtube_dl\downloader\http.py", line 341, in real_download
    establish_connection()
  File "c:\python\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "c:\python\lib\site-packages\youtube_dl\YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\python\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "c:\python\lib\urllib\request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "c:\python\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "c:\python\lib\site-packages\youtube_dl\utils.py", line 2578, in http_open
    return self.do_open(functools.partial(
  File "c:\python\lib\urllib\request.py", line 1354, in do_open
    r = h.getresponse()
  File "c:\python\lib\http\client.py", line 1332, in getresponse
    response.begin()
  File "c:\python\lib\http\client.py", line 303, in begin
    version, status, reason = self._read_status()
  File "c:\python\lib\http\client.py", line 272, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

Description

Have not been able to download majority of bilibili videos since last week. For smaller-sized videos, I have been able to complete downloading after trying again a couple of times, but this approach doesn't work for the larger-sized files [>60 mins] (but there have been a small number of exceptions e.g. https://www.bilibili.com/video/BV14W411T7T1).

I have tried downloading using a different computer, as well as a different wi-fi account, but the error still happens.

Nosgoroth commented 4 years ago

Same issue here.

bjsm19 commented 4 years ago

This article solves my problem: [https://bobcares.com/blog/windows-error-10054/]

Nosgoroth commented 4 years ago

That isn't helpful, as this issue is also occurring on a Mac. Could you provide more details?

bjsm19 commented 4 years ago

I'm not too sure if we are facing the same issue but this is what happened for me: Subsequent to the post, I had other error messages such as winerror 10054 in conjunction with errno 11001 getaddrinfo failed. But the downloads usually could resume if I keep trying (after every couple of hours) but it still didn't work for the bigger videos. The whole thing was getting so time-consuming that I stopped.

Yesterday I attempted again, and this time I could not download at all because the connection was immediately forcibly closed. Since the problem now had a clear cause, I got rid of the problem by reviewing my existing firewall configuration as per the article's advice. After that, I tried downloading around three or four big files (>1 gb) as a test across two days, and it went smoothly so I decided to close the issue.