From 76e1ef763642f66df6edfc08700713ff364f06f5 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Thu, 17 Jan 2013 13:54:04 +0100 Subject: [PATCH] Sohu: fix #69 --- you_get/downloader/sohu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/you_get/downloader/sohu.py b/you_get/downloader/sohu.py index fc0a8a62..5e6df793 100644 --- a/you_get/downloader/sohu.py +++ b/you_get/downloader/sohu.py @@ -12,7 +12,7 @@ def real_url(host, prot, file, new): return '%s%s?key=%s' % (start[:-1], new, key) def sohu_download(url, output_dir = '.', merge = True, info_only = False): - vid = r1('vid="(\d+)"', get_html(url)) + vid = r1('vid\s*=\s*"(\d+)"', get_html(url)) if vid: data = json.loads(get_decoded_html('http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' % vid)) @@ -33,7 +33,7 @@ def sohu_download(url, output_dir = '.', merge = True, info_only = False): assert data['clipsURL'][0].endswith('.mp4') else: - vid = r1('vid=\'(\d+)\'', get_html(url)) + vid = r1('vid\s*=\s*\'(\d+)\'', get_html(url)) data = json.loads(get_decoded_html('http://my.tv.sohu.com/videinfo.jhtml?m=viewnew&vid=%s' % vid)) host = data['allot'] prot = data['prot']