

def _get_streams(self):
    match = _url_re.match(self.url)
    res = http.get(STREAM_INFO_URL, params=match.groupdict(), acceptable_status=STATUS_UNAVAILABLE)
    if (res.status_code in STATUS_UNAVAILABLE):
        return
    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'])
    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']))
    else:
        return

dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/plugins/periscope.py Periscope._get_streams/original