Skip to content

Commit

Permalink
* Sohu: default to download the best quality
Browse files Browse the repository at this point in the history
  • Loading branch information
twlz0ne committed Jan 3, 2013
1 parent f58ff20 commit da25d8a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions you_get/downloader/sohu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def sohu_download(url, output_dir = '.', merge = True, info_only = False):
assert vid
import json
data = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % vid))
for qtyp in ["oriVid","superVid","highVid" ,"norVid","relativeId"]:
hqvid = data['data'][qtyp]
if hqvid != 0 and hqvid != vid :
data = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % hqvid))
break
host = data['allot']
prot = data['prot']
urls = []
Expand Down

0 comments on commit da25d8a

Please sign in to comment.