mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
miaopai fix
This commit is contained in:
parent
d7d3237bf9
commit
5b22081a9c
@ -80,6 +80,8 @@ def miaopai_download_story(url, output_dir='.', merge=False, info_only=False, **
|
|||||||
|
|
||||||
def miaopai_download_h5api(url, output_dir='.', merge=False, info_only=False, **kwargs):
|
def miaopai_download_h5api(url, output_dir='.', merge=False, info_only=False, **kwargs):
|
||||||
oid = match1(url, r'/show/(\d{4}:\w+)')
|
oid = match1(url, r'/show/(\d{4}:\w+)')
|
||||||
|
if oid is None:
|
||||||
|
oid = match1(url, r'\?fid=(\d{4}:\w+)')
|
||||||
page = "/show/%s" % oid
|
page = "/show/%s" % oid
|
||||||
data_url = 'https://h5.video.weibo.com/api/component?%s' % parse.urlencode({
|
data_url = 'https://h5.video.weibo.com/api/component?%s' % parse.urlencode({
|
||||||
'page': page
|
'page': page
|
||||||
@ -156,6 +158,9 @@ def miaopai_download(url, output_dir='.', merge=False, info_only=False, **kwargs
|
|||||||
if re.match(r'^http[s]://(.+\.)?weibo\.com/(tv/)?show/(\d{4}:\w+)', url):
|
if re.match(r'^http[s]://(.+\.)?weibo\.com/(tv/)?show/(\d{4}:\w+)', url):
|
||||||
return miaopai_download_h5api(url, info_only=info_only, output_dir=output_dir, merge=merge, **kwargs)
|
return miaopai_download_h5api(url, info_only=info_only, output_dir=output_dir, merge=merge, **kwargs)
|
||||||
|
|
||||||
|
if re.match(r'^http[s]://(.+\.)?weibo\.com/show\?fid=(\d{4}:\w+)', url):
|
||||||
|
return miaopai_download_h5api(url, info_only=info_only, output_dir=output_dir, merge=merge, **kwargs)
|
||||||
|
|
||||||
fid = match1(url, r'\?fid=(\d{4}:\w+)')
|
fid = match1(url, r'\?fid=(\d{4}:\w+)')
|
||||||
if fid is not None:
|
if fid is not None:
|
||||||
miaopai_download_by_fid(fid, output_dir, merge, info_only)
|
miaopai_download_by_fid(fid, output_dir, merge, info_only)
|
||||||
|
Loading…
Reference in New Issue
Block a user