Sfoglia il codice sorgente

[lci] Fix extraction (closes #17274)

Sergey M․ 7 anni fa
parent
commit
bf1245d236
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      youtube_dl/extractor/lci.py

+ 3 - 1
youtube_dl/extractor/lci.py

@@ -20,5 +20,7 @@ class LCIIE(InfoExtractor):
     def _real_extract(self, url):
     def _real_extract(self, url):
         video_id = self._match_id(url)
         video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
         webpage = self._download_webpage(url, video_id)
-        wat_id = self._search_regex(r'data-watid=[\'"](\d+)', webpage, 'wat id')
+        wat_id = self._search_regex(
+            (r'data-watid=[\'"](\d+)', r'idwat["\']?\s*:\s*["\']?(\d+)'),
+            webpage, 'wat id')
         return self.url_result('wat:' + wat_id, 'Wat', wat_id)
         return self.url_result('wat:' + wat_id, 'Wat', wat_id)