From 5b22081a9cfa46beba8ece3e7f91e0d6d5cde95d Mon Sep 17 00:00:00 2001 From: zheng zhiwen Date: Mon, 17 Oct 2022 16:10:30 +0800 Subject: [PATCH] miaopai fix --- src/you_get/extractors/miaopai.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/you_get/extractors/miaopai.py b/src/you_get/extractors/miaopai.py index 05c1e650..91a301b8 100644 --- a/src/you_get/extractors/miaopai.py +++ b/src/you_get/extractors/miaopai.py @@ -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): oid = match1(url, r'/show/(\d{4}:\w+)') + if oid is None: + oid = match1(url, r'\?fid=(\d{4}:\w+)') page = "/show/%s" % oid data_url = 'https://h5.video.weibo.com/api/component?%s' % parse.urlencode({ '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): 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+)') if fid is not None: miaopai_download_by_fid(fid, output_dir, merge, info_only)