mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
<fix>(<bilibili>): fix file disappeared when the title was too long than 80 characters
1. the title will be truncated by utils.fs.legitimize to 80 characters
This commit is contained in:
parent
5498c377ff
commit
ae587135b8
@ -210,7 +210,10 @@ class Bilibili(VideoExtractor):
|
||||
'1') # use URL to decide p-number, not initial_state['p']
|
||||
if pn > 1:
|
||||
part = initial_state['videoData']['pages'][p - 1]['part']
|
||||
self.title = '%s (P%s. %s)' % (self.title, p, part)
|
||||
"""
|
||||
title's length is limited max 80 characters defined in `utils.fs.legitimize`.
|
||||
"""
|
||||
self.title = 'P%s. %s' % (p, part)
|
||||
|
||||
# construct playinfos
|
||||
avid = initial_state['aid']
|
||||
|
@ -40,6 +40,10 @@ class YouGetTests(unittest.TestCase):
|
||||
def test_acfun(self):
|
||||
acfun.download('https://www.acfun.cn/v/ac11701912', info_only=True)
|
||||
|
||||
def test_bilibili(self):
|
||||
bilibili.download_playlist('https://www.bilibili.com/video/BV1Zv411G7ty', output_dir='.', playlist=True,
|
||||
merge=True, is_only=True)
|
||||
|
||||
#def test_soundcloud(self):
|
||||
## single song
|
||||
#soundcloud.download(
|
||||
|
Loading…
Reference in New Issue
Block a user