Skip to content

A feature-rich command-line audio/video downloader

[iqiyi] Improve regex pattern again

Yen Chi Hsuan9c5f685ef14a
diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.py
index 122f33692e..15481b84b7 100644
--- a/youtube_dl/extractor/iqiyi.py
+++ b/youtube_dl/extractor/iqiyi.py
@@ -223,7 +223,7 @@ class IqiyiIE(InfoExtractor):
video_id = self._search_regex(
r'data-player-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')
swf_url = self._search_regex(
- r'(http://.+?MainPlayer.+?\.swf)', webpage, 'swf player URL')
+ r'(http://[^\'"]+MainPlayer[^.]+\.swf)', webpage, 'swf player URL')
_uuid = uuid.uuid4().hex
enc_key = self.get_enc_key(swf_url, video_id)