[svtplay] Fix video id extraction (closes #28058)
authorSergey M․ <dstftw@gmail.com>
Wed, 3 Feb 2021 21:17:45 +0000 (04:17 +0700)
committerSergey M․ <dstftw@gmail.com>
Wed, 3 Feb 2021 21:17:45 +0000 (04:17 +0700)
youtube_dl/extractor/svt.py

index a0b6ef4db66d1bee911a6ba28be2455b7ec30547..4acc29fce74e617b6a7c6eeb107fa721e6f2b745 100644 (file)
@@ -255,8 +255,10 @@ class SVTPlayIE(SVTPlayBaseIE):
             svt_id = self._search_regex(
                 (r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
                  r'["\']videoSvtId["\']\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-]+)'),
+                 r'["\']svtId["\']\s*:\s*["\']([\da-zA-Z-]+)',
+                 r'["\']svtId\\?["\']\s*:\s*\\?["\']([\da-zA-Z-]+)'),
                 webpage, 'video id')
 
         info_dict = self._extract_by_video_id(svt_id, webpage)