A feature-rich command-line audio/video downloader
[iqiyi] Simplify and improve regex patterns
Yen Chi Hsuan29e7e0781b1b
diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.pyindex 5645fb6eee..18a7587a25 100644--- a/youtube_dl/extractor/iqiyi.py+++ b/youtube_dl/extractor/iqiyi.py@@ -161,12 +161,11 @@ class IqiyiIE(InfoExtractor):webpage = self._download_webpage(url, 'temp_id', note='download video page')tvid = self._search_regex(- r'tvId ?= ?(\'|\")(?P<tvid>\d+)', webpage, 'tvid', flags=re.I, group='tvid')+ r'data-player-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid')video_id = self._search_regex(- r'videoId ?= ?(\'|\")(?P<video_id>[a-z\d]+)',- webpage, 'video_id', flags=re.I, group='video_id')+ r'data-player-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')swf_url = self._search_regex(- r'(?P<swf>http://.+?MainPlayer.+?\.swf)', webpage, 'swf')+ r'(http://.+?MainPlayer.+?\.swf)', webpage, 'swf player URL')_uuid = uuid.uuid4().hexenc_key = self.get_enc_key(swf_url, video_id)