you-get
you-get copied to clipboard
bilibili download stuck
Had to use ctrl-c to kill. Then if resume download and wait long enough, download will reach 100% then exceed the file size, and I have to use ctrl-c again. e.g.:
Downloading NONAME.mp4 ...
100% ( ๐ฐ๐35.4๐/ 31.2MB) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค[2/2] 436 MB/s
debug output:
you-get https://www.bilibili.com/video/av52500651\?spm_id_from\=333.6.b_686967685f656e65726779.3 --debug
[DEBUG] get_content: https://www.bilibili.com/video/av52500651?spm_id_from=333.6.b_686967685f656e65726779.3
[DEBUG] get_content: https://www.bilibili.com/video/av52500651?spm_id_from=333.6.b_686967685f656e65726779.3
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=iVGUTjsxvpLeuDCf&cid=91878701&otype=json&qn=64&quality=64&type=&sign=d6d28e42fa09c20132d856fa30ada039
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=iVGUTjsxvpLeuDCf&cid=91878701&otype=json&qn=32&quality=32&type=&sign=f8030cd08ffd900e81c4b9e00a39ff34
[DEBUG] get_content: https://api.bilibili.com/x/player/playurl?avid=52500651&cid=91878701&qn=16&type=&otype=json&fnver=0&fnval=16
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=iVGUTjsxvpLeuDCf&cid=91878701&otype=json&qn=16&quality=16&type=&sign=270a68b322af3db2b2ab6bef664b8e8f
[DEBUG] get_content: http://comment.bilibili.com/91878701.xml
site: Bilibili
title: ใMoe้
ฑใ็จป้ฆ ๅจๆฐไผฆ ๅไปๅผนๅฑ
stream:
- format: dash-flv720
container: mp4
quality: ้ซๆธ
720P
size: 41.6 MiB (43611876 bytes)
# download-with: you-get --format=dash-flv720 [URL]
Downloading ใMoe้
ฑใ็จป้ฆ ๅจๆฐไผฆ ๅไปๅผนๅฑ.mp4 ...
98.6% ( 41.0/ 41.6MB) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค[2/2] 48 kB/s^CTraceback (most recent call last):
File "/Users/simonguo/.pyenv/versions/you-get/bin/you-get", line 10, in <module>
sys.exit(main())
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/__main__.py", line 92, in main
main(**kwargs)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 1733, in main
script_main(any_download, any_download_playlist, **kwargs)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 1621, in script_main
**extra
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 1284, in download_main
download(url, **kwargs)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 1724, in any_download
m.download(url, **kwargs)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/extractor.py", line 61, in download_by_url
self.download(**kwargs)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/extractor.py", line 241, in download
av=stream_id in self.dash_streams)
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 977, in download_urls
headers=headers, **kwargs
File "/Users/simonguo/.pyenv/versions/3.6.4/envs/you-get/lib/python3.6/site-packages/you_get/common.py", line 738, in url_save
buffer = response.read(1024 * 256)
File "/Users/simonguo/.pyenv/versions/3.6.4/lib/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/Users/simonguo/.pyenv/versions/3.6.4/lib/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/Users/simonguo/.pyenv/versions/3.6.4/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
KeyboardInterrupt
Hello @sgyzetrov, Thanks for the Pull Request. We :heart: our contributors! Please wait for one of our human maintainers to review your patches. This may take a few days to weeks. Also, please understand that although your Pull Request may or may not be eventually merged, we value all contributions equally.
็ฅๆจๅฅๅบท!
Yeah...so as I said before, resuming download will get the progress bar to reach 100%, but also exceed the original say .mp4
file size. By killing it again and then resuming again, you-get WILL complete the download, but the audio of say .mp4
file was partially lost...
Can't reproduce. It's most likely a temporary CDN/network-related problem.
I also encountered the same problem. The link of the video is "https://www.bilibili.com/video/av21781975?from=search&seid=11572859925132900428."
I also encountered the same problem. Any information I can provide to reproduce the problem?
@soimort Thank you for looking into this. Any theories or workarounds would be really helpful.
At this time, the problem seems to occur when the user is using Chinese ISP (I have tried using servers in HK, did not reproduce the bug. @weidongzhou1994 @ghoslin01 could you please confirm your network service provider? Is it also Chinese-based ISP like China Telecom, China Unicom, etc.?).
Best, Simon
Thank you, My network is Chinese-based ISP.
The problem seems to be that the program failed to properly utilize the temporary .download
file after interruption (by connection error, user intervention, whatsoever).
If you observed carefully: you shall notice that the total size (to finish after interruption) equals to the downloaded size (before interruption) + expected size.
[*] Do note that the program attempts to retry upon interruptions (errors).
~~To workaround this problem~~:
Quote "/README.md" ยง Pause and resume a download:
To enforce re-downloading, use the
--force
/-f
option. (Warning: doing so will overwrite any existing file or temporary file with the same name!)
It failed... Didn't overwrite the temp file but instead started the writing on top of it.
And eventually ended up with AssertionError... (size mismatch)
So?.. (I think you've known enough regarding the problem)
Probably fixed:
Quote cww0614:
When
url_save
is passed a list of urls (is_chunked = True
), and the download is aborted, then the next time that you-get resumes the download, it will append the video data from beginning to the.download
file, because it does not send a correctRange
header when resuming.Several "exceeding 100%" issues might be related to this: #2703, #2768
Steps to reproduce:
...
Basically, the idea of this pull request is to maintain the starting and ending offset for each chunk. And when resuming, it skips downloaded chunks by comparing the file size and ending offsets, and computes the correct
Range
for the first unfinished chunk.
ไธบไปไนๆๆ ๆณๅๅปบๆฐ็issue
How to download live files
I'm having a differnet stuck problem: The cursor flashes and stuck... It appears even if i updated. The only thing I can do is wait...and it works.
Hope helpful to others.
With -f
enabled, I have met this issue on several different bilibili videos today. A retry is always working so I'm not sure how to reproduce it. BTW my you-get was running on an American VPS.
ๆไน้ๅฐไบ่ฟไธช้ฎ้ขใๆๅฐ่ฏไบๅ ็งไธ่ฝฝ่ฝฏไปถ๏ผ้ฝไธ่กใ ็ปไธไธชๅฐๅไฝ ไปฌๅฅฝๅฅฝ็ ็ฉถไธใ you-get https://v.qq.com/x/cover/j6o4g5envbm8aip/j0136uvp03u.html lux https://v.qq.com/x/cover/j6o4g5envbm8aip/j0136uvp03u.html ykdl https://v.qq.com/x/cover/j6o4g5envbm8aip/j0136uvp03u.html ้ฝๅกไฝๅจ95% ....