mirror of
https://github.com/soimort/you-get.git
synced 2025-02-09 19:52:32 +03:00
Add test for haokan.baidu.com
This commit is contained in:
parent
bd06317fcc
commit
5c6f3c5b7c
@ -160,6 +160,8 @@ def baidu_download(url, output_dir='.', stream_type=None, merge=True, info_only=
|
|||||||
if not info_only:
|
if not info_only:
|
||||||
download_urls(urls, title, ext, size,
|
download_urls(urls, title, ext, size,
|
||||||
output_dir=output_dir, merge=False)
|
output_dir=output_dir, merge=False)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("Unknown baidu URL " + url)
|
||||||
|
|
||||||
|
|
||||||
def baidu_pan_download(url):
|
def baidu_pan_download(url):
|
||||||
|
@ -8,7 +8,8 @@ from you_get.extractors import (
|
|||||||
youtube,
|
youtube,
|
||||||
missevan,
|
missevan,
|
||||||
acfun,
|
acfun,
|
||||||
bilibili
|
bilibili,
|
||||||
|
baidu
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -45,5 +46,11 @@ class YouGetTests(unittest.TestCase):
|
|||||||
bilibili.download(
|
bilibili.download(
|
||||||
"https://www.bilibili.com/watchlater/#/av74906671/p6", info_only=True
|
"https://www.bilibili.com/watchlater/#/av74906671/p6", info_only=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_baidu_haokan(self):
|
||||||
|
baidu.download(
|
||||||
|
'https://haokan.baidu.com/v?vid=6794443542184039159&pd=bjh&fr=bjhauthor&type=video', info_only=True
|
||||||
|
)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user