def process_url(self, page_num, page_size, url):
params = dict()<EOL>if page_num is not None:<EOL><INDENT>url = re.sub('<STR_LIT>', '<STR_LIT>', url)<EOL>params['<STR_LIT>'] = page_num<EOL><DEDENT>if page_size is not None:<EOL><INDENT>url = re.sub('<STR_LIT>', '<STR_LIT>', url)<EOL>params['<STR_LIT>'] = page_size<EOL><DEDENT>return params, url<EOL>
When slicing, remove the per_page and page parameters and pass to requests in the params dict