]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[streamango] Make title optional
authorLuca Steeb <contact@luca-steeb.com>
Mon, 5 Jun 2017 18:17:43 +0000 (20:17 +0200)
committerSergey M․ <dstftw@gmail.com>
Wed, 7 Jun 2017 14:53:33 +0000 (21:53 +0700)
youtube_dl/extractor/streamango.py

index aa4fad162c5ff2e50b6c055af3b0673a3f72f39e..cf03d5b09a1940318ab5584b55b6c62cb49eae3b 100644 (file)
@@ -21,6 +21,13 @@ class StreamangoIE(InfoExtractor):
             'ext': 'mp4',
             'title': '20170315_150006.mp4',
         }
+    }, {
+        'url': 'https://streamango.com/embed/foqebrpftarclpob/asdf_asd_2_mp4',
+        'info_dict': {
+            'id': 'foqebrpftarclpob',
+            'ext': 'mp4',
+            'title': 'foqebrpftarclpob',
+        }
     }, {
         'url': 'https://streamango.com/embed/clapasobsptpkdfe/20170315_150006_mp4',
         'only_matching': True,
@@ -31,7 +38,7 @@ class StreamangoIE(InfoExtractor):
 
         webpage = self._download_webpage(url, video_id)
 
-        title = self._og_search_title(webpage)
+        title = self._og_search_title(webpage, default=video_id)
 
         formats = []
         for format_ in re.findall(r'({[^}]*\bsrc\s*:\s*[^}]*})', webpage):