mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Fix AcFun Bangumi download.
This commit is contained in:
parent
be931a5416
commit
aa151acaa3
@ -403,7 +403,7 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the
|
|||||||
| **niconico<br/>ニコニコ動画** | <http://www.nicovideo.jp/> |✓| | |
|
| **niconico<br/>ニコニコ動画** | <http://www.nicovideo.jp/> |✓| | |
|
||||||
| **163<br/>网易视频<br/>网易云音乐** | <http://v.163.com/><br/><http://music.163.com/> |✓| |✓|
|
| **163<br/>网易视频<br/>网易云音乐** | <http://v.163.com/><br/><http://music.163.com/> |✓| |✓|
|
||||||
| 56网 | <http://www.56.com/> |✓| | |
|
| 56网 | <http://www.56.com/> |✓| | |
|
||||||
| **AcFun** | <http://www.acfun.tv/> |✓| | |
|
| **AcFun** | <http://www.acfun.cn/> |✓| | |
|
||||||
| **Baidu<br/>百度贴吧** | <http://tieba.baidu.com/> |✓|✓| |
|
| **Baidu<br/>百度贴吧** | <http://tieba.baidu.com/> |✓|✓| |
|
||||||
| 爆米花网 | <http://www.baomihua.com/> |✓| | |
|
| 爆米花网 | <http://www.baomihua.com/> |✓| | |
|
||||||
| **bilibili<br/>哔哩哔哩** | <http://www.bilibili.com/> |✓| | |
|
| **bilibili<br/>哔哩哔哩** | <http://www.bilibili.com/> |✓| | |
|
||||||
|
@ -124,10 +124,11 @@ def acfun_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
# bangumi
|
# bangumi
|
||||||
elif re.match("https?://[^\.]*\.*acfun\.[^\.]+/bangumi/ab(\d+)", url):
|
elif re.match("https?://[^\.]*\.*acfun\.[^\.]+/bangumi/ab(\d+)", url):
|
||||||
html = get_content(url)
|
html = get_content(url)
|
||||||
title = match1(html, r'"title"\s*:\s*"([^"]+)"')
|
tag_script = match1(html, r'<script>window\.pageInfo([^<]+)</script>')
|
||||||
if match1(url, r'_(\d+)$'): # current P
|
json_text = tag_script[tag_script.find('{') : tag_script.find('};') + 1]
|
||||||
title = title + " " + r1(r'active">([^<]*)', html)
|
json_data = json.loads(json_text)
|
||||||
vid = match1(html, r'videoId="(\d+)"')
|
title = json_data['bangumiTitle'] + " " + json_data['episodeName'] + " " + json_data['title']
|
||||||
|
vid = str(json_data['videoId'])
|
||||||
up = "acfun"
|
up = "acfun"
|
||||||
else:
|
else:
|
||||||
raise NotImplemented
|
raise NotImplemented
|
||||||
@ -148,6 +149,6 @@ def acfun_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
||||||
|
|
||||||
site_info = "AcFun.tv"
|
site_info = "AcFun.cn"
|
||||||
download = acfun_download
|
download = acfun_download
|
||||||
download_playlist = playlist_not_supported('acfun')
|
download_playlist = playlist_not_supported('acfun')
|
||||||
|
Loading…
Reference in New Issue
Block a user