]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[tele5] Improve video id extraction
authorSergey M․ <dstftw@gmail.com>
Sun, 12 May 2019 17:13:00 +0000 (00:13 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 12 May 2019 17:13:00 +0000 (00:13 +0700)
youtube_dl/extractor/tele5.py

index 0b346d7be44d26ff5a1849dafc39a77701334c1b..33a72083bff96a74e04020257ba3305d1cfee2ca 100644 (file)
@@ -48,8 +48,9 @@ class Tele5IE(InfoExtractor):
             display_id = self._match_id(url)
             webpage = self._download_webpage(url, display_id)
             video_id = self._html_search_regex(
-                r'id\s*=\s*["\']video-player["\'][^>]+data-id\s*=\s*["\'](\d+)',
-                webpage, 'video id')
+                (r'id\s*=\s*["\']video-player["\'][^>]+data-id\s*=\s*["\'](\d+)',
+                 r'\s+id\s*=\s*["\']player_(\d{6,})',
+                 r'\bdata-id\s*=\s*["\'](\d{6,})'), webpage, 'video id')
 
         return self.url_result(
             'https://api.nexx.cloud/v3/759/videos/byid/%s' % video_id,