From a1343d792c57be5aa6fe34096514e56d7b7185b8 Mon Sep 17 00:00:00 2001 From: intact Date: Tue, 7 Mar 2017 00:26:31 +0100 Subject: [PATCH 1/2] plugins.periscope: Update for API change --- src/livestreamer/plugins/periscope.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/livestreamer/plugins/periscope.py b/src/livestreamer/plugins/periscope.py index 09a9e0d1..7862705c 100644 --- a/src/livestreamer/plugins/periscope.py +++ b/src/livestreamer/plugins/periscope.py @@ -10,7 +10,7 @@ STATUS_GONE = 410 STATUS_UNAVAILABLE = (STATUS_GONE,) -_url_re = re.compile(r"http(s)?://(www\.)?periscope.tv/w/(?P[\w\-\=]+)") +_url_re = re.compile(r"http(s)?://(www\.)?periscope.tv/[^/]+/(?P[\w\-\=]+)") _stream_schema = validate.Schema( validate.any( None, @@ -46,7 +46,7 @@ def _get_streams(self): playlist_url = http.json(res, schema=_stream_schema) if "hls_url" in playlist_url: - return HLSStream.parse_variant_playlist(self.session, playlist_url["hls_url"]) + return dict(replay=HLSStream(self.session, playlist_url["hls_url"])) elif "replay_url" in playlist_url: self.logger.info("Live Stream ended, using replay instead") return dict(replay=HLSStream(self.session, playlist_url["replay_url"])) From ef9a8294b569f0e293ef917c53c45f21e5e2aca0 Mon Sep 17 00:00:00 2001 From: intact Date: Sat, 1 Apr 2017 19:40:44 +0200 Subject: [PATCH 2/2] plugins.periscope: Update for API change --- src/livestreamer/plugins/periscope.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/livestreamer/plugins/periscope.py b/src/livestreamer/plugins/periscope.py index 7862705c..b517d84b 100644 --- a/src/livestreamer/plugins/periscope.py +++ b/src/livestreamer/plugins/periscope.py @@ -5,12 +5,12 @@ from livestreamer.stream import HLSStream -STREAM_INFO_URL = "https://api.periscope.tv/api/v2/getAccessPublic" +STREAM_INFO_URL = "https://proxsee.pscp.tv/api/v2/accessVideoPublic" STATUS_GONE = 410 STATUS_UNAVAILABLE = (STATUS_GONE,) -_url_re = re.compile(r"http(s)?://(www\.)?periscope.tv/[^/]+/(?P[\w\-\=]+)") +_url_re = re.compile(r"http(s)?://(www\.)?(?:periscope|pscp).tv/[^/]+/(?P[\w\-\=]+)") _stream_schema = validate.Schema( validate.any( None,