From 63e6c4da416181af578f2cb93c100b2035276e0b Mon Sep 17 00:00:00 2001 From: MaxwellGoblin Date: Mon, 24 Apr 2017 13:54:23 +0800 Subject: [PATCH] fix iqiyi tiltes when accessed with curid= --- src/you_get/extractors/iqiyi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/iqiyi.py b/src/you_get/extractors/iqiyi.py index 91329708..a13718e3 100644 --- a/src/you_get/extractors/iqiyi.py +++ b/src/you_get/extractors/iqiyi.py @@ -134,7 +134,12 @@ class Iqiyi(VideoExtractor): r1(r'vid=([^&]+)', self.url) or \ r1(r'data-player-videoid="([^"]+)"', html) self.vid = (tvid, videoid) - self.title = match1(html, '([^<]+)').split('-')[0] + info_u = 'http://mixer.video.iqiyi.com/jp/mixin/videos/' + tvid + mixin = get_content(info_u) + mixin_json = json.loads(mixin[len('var tvInfoJs='):]) + real_u = mixin_json['url'] + real_html = get_content(real_u) + self.title = match1(real_html, '<title>([^<]+)').split('-')[0] tvid, videoid = self.vid info = getVMS(tvid, videoid) assert info['code'] == 'A00000', 'can\'t play this video'