Sfoglia il codice sorgente

[iqiyi] Improve regex pattern again

Yen Chi Hsuan 10 anni fa
parent
commit
9c5f685ef1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      youtube_dl/extractor/iqiyi.py

+ 1 - 1
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)