mirror of
https://github.com/soimort/you-get.git
synced 2025-02-09 11:42:30 +03:00
fix sohu
This commit is contained in:
parent
5e5d2540d5
commit
8c41765d13
@ -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)
|
vid = r1(r'\Wvid\s*[\:=]\s*[\'"]?(\d+)[\'"]?', html)
|
||||||
assert vid
|
assert vid
|
||||||
|
|
||||||
if re.match(r'http[s]://tv.sohu.com/', url):
|
if extractor_proxy:
|
||||||
if extractor_proxy:
|
set_proxy(tuple(extractor_proxy.split(":")))
|
||||||
set_proxy(tuple(extractor_proxy.split(":")))
|
info = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % vid))
|
||||||
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"]:
|
for qtyp in ["oriVid", "superVid", "highVid", "norVid", "relativeId"]:
|
||||||
if 'data' in info:
|
if 'data' in info:
|
||||||
hqvid = info['data'][qtyp]
|
hqvid = info['data'][qtyp]
|
||||||
|
Loading…
Reference in New Issue
Block a user