src/streamlink/plugins/webtv.py
def _get_streams(self):
        """
        Find the streams for web.tv
        :return:
        """
        headers = {}
        res = self.session.http.get(self.url, headers=headers)
        headers["Referer"] = self.url

        sources = self._sources_re.findall(res.text)
        if len(sources):
            sdata = parse_json(sources[0], schema=self._sources_schema)
            for source in sdata:
                self.logger.debug("Found stream of type: {}", source[u'type'])
                if source[u'type'] == u"application/vnd.apple.mpegurl":
                    url = update_scheme(self.url, source[u"src"])

                    try:
                        # try to parse the stream as a variant playlist
                        variant = HLSStream.parse_variant_playlist(self.session, url, headers=headers)
                        if variant:
                            for q, s in variant.items():
                                yield q, s
                        else:
                            # and if that fails, try it as a plain HLS stream
                            yield 'live', HLSStream(self.session, url, headers=headers)
                    except IOError:
                        self.logger.warning("Could not open the stream, perhaps the channel is offline")
def _get_streams(self):
        """
        Find the streams for web.tv
        :return:
        """
        headers = {}
        res = self.session.http.get(self.url, headers=headers)
        headers["Referer"] = self.url

        sources = self._sources_re.findall(res.text)
        if len(sources):
            sdata = parse_json(sources[0], schema=self._sources_schema)
            for source in sdata:
                self.logger.debug("Found stream of type: {}", source[u'type'])
                if source[u'type'] == u"application/vnd.apple.mpegurl":
                    url = update_scheme(self.url, source[u"src"])

                    try:
                        # try to parse the stream as a variant playlist
                        variant = HLSStream.parse_variant_playlist(self.session, url, headers=headers)
                        if variant:
                            for q, s in variant.items():
                                yield q, s
                        else:
                            # and if that fails, try it as a plain HLS stream
                            yield 'live', HLSStream(self.session, url, headers=headers)
                    except IOError:
                        self.logger.warning("Could not open the stream, perhaps the channel is offline")
def _get_streams ( self ) : headers = { } res = self . session . http . get ( self . url , headers = headers ) headers [ "Referer" ] = self . url sources = self . _sources_re . findall ( res . text ) if len ( sources ) : sdata = parse_json ( sources [ 0 ] , schema = self . _sources_schema ) for source in sdata : self . logger . debug ( "Found stream of type: {}" , source [ u'type' ] ) if source [ u'type' ] == u"application/vnd.apple.mpegurl" : url = update_scheme ( self . url , source [ u"src" ] ) try : # try to parse the stream as a variant playlist variant = HLSStream . parse_variant_playlist ( self . session , url , headers = headers ) if variant : for q , s in variant . items ( ) : yield q , s else : # and if that fails, try it as a plain HLS stream yield 'live' , HLSStream ( self . session , url , headers = headers ) except IOError : self . logger . warning ( "Could not open the stream, perhaps the channel is offline" )
Find the streams for web.tv
        :return:
Find the streams for web . tv : return :