def __search(self, pt="<STR_LIT>"):
if not self.search_params.get('<STR_LIT:q>') and not self.search_params.get('<STR_LIT>'):<EOL><INDENT>return {'<STR_LIT>': []} <EOL><DEDENT>api_fixed_url = "<STR_LIT>"<EOL>d = {"<STR_LIT:key>": self.api_key, "<STR_LIT>": pt}<EOL>d.update(self.search_params)<EOL>url = api_fixed_url + urlencode(d)<EOL>try:<EOL><INDENT>get = requests.get(url)<EOL><DEDENT>except requests.exceptions.ConnectionError:<EOL><INDENT>raise ConnectionError<EOL><DEDENT>if get.status_code != <NUM_LIT:200>:<EOL><INDENT>return {'<STR_LIT>': []} <EOL><DEDENT>return get.json()<EOL>
Method responsible for searching using YouTube API.

Parameters
----------
pt : str
    Token of search results page. If ``None``, then the first page is downloaded.

Returns
-------
results : dict
    Parsed JSON returned by YouTube API.