def __getChannelId(self):
if not self.search_params.get("<STR_LIT>"):<EOL><INDENT>return<EOL><DEDENT>api_fixed_url = "<STR_LIT>"<EOL>url = api_fixed_url + urlencode({"<STR_LIT:key>": self.api_key, "<STR_LIT>": self.search_params["<STR_LIT>"]})<EOL>get = requests.get(url).json()<EOL>try:<EOL><INDENT>self.search_params["<STR_LIT>"] = get['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT:id>']<EOL>return <EOL><DEDENT>except IndexError:<EOL><INDENT>pass <EOL><DEDENT>api_fixed_url = "<STR_LIT>"<EOL>url = api_fixed_url + urlencode({"<STR_LIT:key>": self.api_key, "<STR_LIT:q>": self.search_params['<STR_LIT>']})<EOL>get = requests.get(url).json()<EOL>try:<EOL><INDENT>self.search_params["<STR_LIT>"] = get['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT:id>']['<STR_LIT>']<EOL><DEDENT>except IndexError:<EOL><INDENT>del self.search_params["<STR_LIT>"]<EOL><DEDENT>
Obtain channel id for channel name, if present in ``self.search_params``.