This commit is contained in:
GuanFoxyier 2019-05-24 14:35:49 +08:00
parent 5e5d2540d5
commit 8c41765d13

View File

@ -29,10 +29,10 @@ def sohu_download(url, output_dir='.', merge=True, info_only=False, extractor_pr
vid = r1(r'\Wvid\s*[\:=]\s*[\'"]?(\d+)[\'"]?', html)
assert vid
if re.match(r'http[s]://tv.sohu.com/', url):
if extractor_proxy:
set_proxy(tuple(extractor_proxy.split(":")))
info = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % vid))
if extractor_proxy:
set_proxy(tuple(extractor_proxy.split(":")))
info = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % vid))
if info and info.get("data", ""):
for qtyp in ["oriVid", "superVid", "highVid", "norVid", "relativeId"]:
if 'data' in info:
hqvid = info['data'][qtyp]