mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
[bilibili] quick hack for bangumi URLs (fix #1226)
This commit is contained in:
parent
9c8d8b0023
commit
d8aca8f542
@ -120,6 +120,11 @@ def bilibili_live_download_by_cid(cid, title, output_dir='.', merge=True, info_o
|
|||||||
def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||||
html = get_content(url)
|
html = get_content(url)
|
||||||
|
|
||||||
|
if re.match(r'https?://bangumi\.bilibili\.com/', url):
|
||||||
|
# quick hack for bangumi URLs
|
||||||
|
url = r1(r'"([^"]+)" class="v-av-link"', html)
|
||||||
|
html = get_content(url)
|
||||||
|
|
||||||
title = r1_of([r'<meta name="title" content="([^<>]{1,999})" />',
|
title = r1_of([r'<meta name="title" content="([^<>]{1,999})" />',
|
||||||
r'<h1[^>]*>([^<>]+)</h1>'], html)
|
r'<h1[^>]*>([^<>]+)</h1>'], html)
|
||||||
if title:
|
if title:
|
||||||
|
Loading…
Reference in New Issue
Block a user