[svtplay] Fix id extraction (closes #26576)
authorSergey M․ <dstftw@gmail.com>
Sun, 13 Sep 2020 11:59:37 +0000 (18:59 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 13 Sep 2020 11:59:37 +0000 (18:59 +0700)
youtube_dl/extractor/svt.py

index 8e9ec2ca3cbe1880ee96d83594af3bbb49f90dce..2f6887d86cb915713e9047b766d5d5741b5d4e77 100644 (file)
@@ -231,7 +231,9 @@ class SVTPlayIE(SVTPlayBaseIE):
         if not svt_id:
             svt_id = self._search_regex(
                 (r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
-                 r'"content"\s*:\s*{.*?"id"\s*:\s*"([\da-zA-Z-]+)"'),
+                 r'["\']videoSvtId["\']\s*:\s*["\']([\da-zA-Z-]+)',
+                 r'"content"\s*:\s*{.*?"id"\s*:\s*"([\da-zA-Z-]+)"',
+                 r'["\']svtId["\']\s*:\s*["\']([\da-zA-Z-]+)'),
                 webpage, 'video id')
 
         return self._extract_by_video_id(svt_id, webpage)