diff --git a/src/livestreamer/plugins/periscope.py b/src/livestreamer/plugins/periscope.py index 09a9e0d1..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/w/(?P[\w\-\=]+)") +_url_re = re.compile(r"http(s)?://(www\.)?(?:periscope|pscp).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"]))