def _get_streams(self):
<EOL>self.login()<EOL>res = self.session.http.get(self.url)<EOL>matches = self.config_re.finditer(res.text)<EOL>try:<EOL><INDENT>config = self.config_schema.validate(dict(<EOL>[m.group("<STR_LIT:key>", "<STR_LIT:value>") for m in matches]<EOL>))<EOL><DEDENT>except PluginError:<EOL><INDENT>return<EOL><DEDENT>if config["<STR_LIT>"]:<EOL><INDENT>self.logger.debug("<STR_LIT>", config["<STR_LIT>"])<EOL>api_url = urljoin(self.url, urljoin(config["<STR_LIT>"], config["<STR_LIT>"]))<EOL><DEDENT>elif config["<STR_LIT>"]:<EOL><INDENT>self.logger.debug("<STR_LIT>", config["<STR_LIT>"])<EOL>api_url = urljoin(self.url, config["<STR_LIT>"])<EOL><DEDENT>else:<EOL><INDENT>return<EOL><DEDENT>ares = self.session.http.get(api_url)<EOL>data = self.session.http.json(ares, schema=self.api_schema)<EOL>viewing_urls = data["<STR_LIT>"]<EOL>if "<STR_LIT:error>" in viewing_urls:<EOL><INDENT>self.logger.error("<STR_LIT>", viewing_urls["<STR_LIT:error>"])<EOL><DEDENT>else:<EOL><INDENT>for url in viewing_urls["<STR_LIT>"]:<EOL><INDENT>try:<EOL><INDENT>label = "<STR_LIT>".format(url.get("<STR_LIT>", url["<STR_LIT:label>"]))<EOL><DEDENT>except KeyError:<EOL><INDENT>label = "<STR_LIT>"<EOL><DEDENT>if url["<STR_LIT:type>"] == "<STR_LIT>" and RTMPStream.is_usable(self.session):<EOL><INDENT>params = {<EOL>"<STR_LIT>": url["<STR_LIT:src>"],<EOL>"<STR_LIT>": self.url,<EOL>"<STR_LIT>": True,<EOL>}<EOL>yield label, RTMPStream(self.session, params)<EOL><DEDENT>elif url["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>for s in HLSStream.parse_variant_playlist(self.session, url["<STR_LIT:src>"]).items():<EOL><INDENT>yield s<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Get the config object from the page source and call the
API to get the list of streams
:return: