]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[tvp] improve video id extraction(closes #10585)
authorRemita Amine <remitamine@gmail.com>
Wed, 26 Oct 2016 15:46:28 +0000 (16:46 +0100)
committerRemita Amine <remitamine@gmail.com>
Wed, 26 Oct 2016 15:47:22 +0000 (16:47 +0100)
youtube_dl/extractor/tvp.py

index 2abfb78307186a2007e7f375bccb7a26ff0713ca..2dbbc2ca7c86aa30a30716bd73cdd5ba18495e3a 100644 (file)
@@ -69,7 +69,8 @@ class TVPIE(InfoExtractor):
         webpage = self._download_webpage(url, page_id)
         video_id = self._search_regex([
             r'<iframe[^>]+src="[^"]*?object_id=(\d+)',
-            "object_id\s*:\s*'(\d+)'"], webpage, 'video id')
+            r"object_id\s*:\s*'(\d+)'",
+            r'data-video-id="(\d+)"'], webpage, 'video id', default=page_id)
         return {
             '_type': 'url_transparent',
             'url': 'tvp:' + video_id,