support https type downloading from host of tv.cctv.com

This commit is contained in:
jack-zheng 2020-05-05 23:45:20 +08:00
parent 07417e6ef1
commit eca7a1d569

View File

@ -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)