]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[periscope] Support pscp.tv URLs in embedded frames
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Jul 2017 07:35:19 +0000 (15:35 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Jul 2017 07:35:19 +0000 (15:35 +0800)
And fix a relevant twitter test

ChangeLog
youtube_dl/extractor/periscope.py
youtube_dl/extractor/twitter.py

index db1776dcea4454a663f229dd3288f78eca47c6d8..ffb4b69945c02a8e650b39e599deef9ad8961daa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 version <unreleased>
 
 Extractors
++ [periscope] Support pscp.tv URLs in embedded frames
 * [niconico] Fix authentication error handling (#12486)
 * [giantbomb] Extract m3u8 formats (#13626)
 
index 1add6b84035041176f77f2bf454ca6bbfb8c7137..bfa12edc925d148ffecad3cdac4ff22ae321d70e 100644 (file)
@@ -49,7 +49,7 @@ class PeriscopeIE(PeriscopeBaseIE):
     @staticmethod
     def _extract_url(webpage):
         mobj = re.search(
-            r'<iframe[^>]+src=([\'"])(?P<url>(?:https?:)?//(?:www\.)?periscope\.tv/(?:(?!\1).)+)\1', webpage)
+            r'<iframe[^>]+src=([\'"])(?P<url>(?:https?:)?//(?:www\.)?(?:periscope|pscp)\.tv/(?:(?!\1).)+)\1', webpage)
         if mobj:
             return mobj.group('url')
 
index 2041b419915da2b63b6c196261de2f03763e4107..e4bc7e012c7d4d56ed5622c2177c802468ca304f 100644 (file)
@@ -335,10 +335,11 @@ class TwitterIE(InfoExtractor):
         'info_dict': {
             'id': '1zqKVVlkqLaKB',
             'ext': 'mp4',
-            'title': 'Sgt Kerry Schmidt - Ontario Provincial Police - Road rage, mischief, assault, rollover and fire in one occurrence',
+            'title': 'Sgt Kerry Schmidt - LIVE on #Periscope: Road rage, mischief, assault, rollover and fire in one occurrence',
+            'description': 'Sgt Kerry Schmidt on Twitter: "LIVE on #Periscope: Road rage, mischief, assault, rollover and fire in one occurrence  https://t.co/EKrVgIXF3s"',
             'upload_date': '20160923',
             'uploader_id': 'OPP_HSD',
-            'uploader': 'Sgt Kerry Schmidt - Ontario Provincial Police',
+            'uploader': 'Sgt Kerry Schmidt',
             'timestamp': 1474613214,
         },
         'add_ie': ['Periscope'],