def update_url(self, url=None, regex=None):
if not url and not regex:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>headers = {<EOL>'<STR_LIT>': self.token,<EOL>'<STR_LIT:Content-Type>': '<STR_LIT:application/json>',<EOL>}<EOL>data = {<EOL>'<STR_LIT>': settings.PRERENDER_TOKEN,<EOL>}<EOL>if url:<EOL><INDENT>data["<STR_LIT:url>"] = url<EOL><DEDENT>if regex:<EOL><INDENT>data["<STR_LIT>"] = regex<EOL><DEDENT>r = self.session.post(self.RECACHE_URL, headers=headers, data=data)<EOL>return r.status_code < <NUM_LIT><EOL>
Accepts a fully-qualified url, or regex.
Returns True if successful, False if not successful.