]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[laola1tv] Add support for tv.ittf.com (closes #13965)
authorSergey M․ <dstftw@gmail.com>
Sat, 19 Aug 2017 12:48:20 +0000 (19:48 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 19 Aug 2017 12:48:20 +0000 (19:48 +0700)
youtube_dl/extractor/extractors.py
youtube_dl/extractor/laola1tv.py

index ccfa14e7a5036e636eb0f8eac2d5c9b6adc14349..bda6826f19d2842ea5735350801a3a6056394f85 100644 (file)
@@ -509,6 +509,7 @@ from .la7 import LA7IE
 from .laola1tv import (
     Laola1TvEmbedIE,
     Laola1TvIE,
+    ITTFIE,
 )
 from .lci import LCIIE
 from .lcp import (
index 1f91ba0173429aa8b86969b9dc40e45695213e6d..c7f813370162bb8582db8abd9a3f49e3e4bb1bc1 100644 (file)
@@ -215,3 +215,21 @@ class Laola1TvIE(Laola1TvEmbedIE):
             'formats': formats,
             'is_live': is_live,
         }
+
+
+class ITTFIE(InfoExtractor):
+    _VALID_URL = r'https?://tv\.ittf\.com/video/[^/]+/(?P<id>\d+)'
+    _TEST = {
+        'url': 'https://tv.ittf.com/video/peng-wang-wei-matsudaira-kenta/951802',
+        'only_matching': True,
+    }
+
+    def _real_extract(self, url):
+        return self.url_result(
+            update_url_query('https://www.laola1.tv/titanplayer.php', {
+                'videoid': self._match_id(url),
+                'type': 'V',
+                'lang': 'en',
+                'portal': 'int',
+                'customer': 1024,
+            }), Laola1TvEmbedIE.ie_key())