From eca7a1d569d0d94b09aa4889fffccf18f6a1755e Mon Sep 17 00:00:00 2001 From: jack-zheng Date: Tue, 5 May 2020 23:45:20 +0800 Subject: [PATCH] support https type downloading from host of tv.cctv.com --- src/you_get/extractors/cntv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/you_get/extractors/cntv.py b/src/you_get/extractors/cntv.py index 479481d..a56cde6 100644 --- a/src/you_get/extractors/cntv.py +++ b/src/you_get/extractors/cntv.py @@ -44,12 +44,12 @@ def cntv_download_by_id(rid, **kwargs): def cntv_download(url, **kwargs): if re.match(r'http://tv\.cntv\.cn/video/(\w+)/(\w+)', url): rid = match1(url, r'http://tv\.cntv\.cn/video/\w+/(\w+)') - elif re.match(r'http://tv\.cctv\.com/\d+/\d+/\d+/\w+.shtml', url): + elif re.match(r'http(s)?://tv\.cctv\.com/\d+/\d+/\d+/\w+.shtml', url): rid = r1(r'var guid = "(\w+)"', get_content(url)) elif re.match(r'http://\w+\.cntv\.cn/(\w+/\w+/(classpage/video/)?)?\d+/\d+\.shtml', url) or \ re.match(r'http://\w+.cntv.cn/(\w+/)*VIDE\d+.shtml', url) or \ re.match(r'http://(\w+).cntv.cn/(\w+)/classpage/video/(\d+)/(\d+).shtml', url) or \ - re.match(r'http://\w+.cctv.com/\d+/\d+/\d+/\w+.shtml', url) or \ + re.match(r'http(s)?://\w+.cctv.com/\d+/\d+/\d+/\w+.shtml', url) or \ re.match(r'http://\w+.cntv.cn/\d+/\d+/\d+/\w+.shtml', url): page = get_content(url) rid = r1(r'videoCenterId","(\w+)"', page) -- GitLab