def _get_site_status_code(self, url, status_code, api, num_tries, num_apikey_tries):
<EOL>try:<EOL><INDENT>status_code = int(status_code)<EOL><DEDENT>except ValueError:<EOL><INDENT>logger.exception("<STR_LIT>")<EOL>return None<EOL><DEDENT>if status_code >= <NUM_LIT> and num_tries < self._num_retries:<EOL><INDENT>logger.info("<STR_LIT>".format(num_tries, status_code, url),<EOL>extra={'<STR_LIT>': status_code,<EOL>'<STR_LIT>': num_tries,<EOL>'<STR_LIT:url>': url})<EOL>time.sleep(<NUM_LIT>)<EOL>self.new_profile()<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>logger.warning("<STR_LIT>"<EOL>.format(num_tries, status_code, url),<EOL>extra={'<STR_LIT>': status_code,<EOL>'<STR_LIT>': num_tries,<EOL>'<STR_LIT:url>': url})<EOL><DEDENT>return None<EOL>
Check the http status code and num_tries/num_apikey_tries to see if it should try again or not
Log any data as needed