)
logger.debug("response.ok='%s',response.status_code=%d,response.text()=%d", response.ok, response.status_code, len(response.text))
- if response.ok and response.status_code == 200 and response.text.strip() != "" and response.text.find("<html") > 0 and domain_helper.is_in_url(domain, response.url.split("#")[0]):
+ if response.ok and response.status_code == 200 and response.text.strip() != "" and response.text.find("<html") >= 0 and domain_helper.is_in_url(domain, response.url.split("#")[0]):
# Save cookies
logger.debug("Parsing response.text()=%d Bytes ...", len(response.text))
cookies.store(domain, response.cookies.get_dict())
response_url = response.url.split("#")[0]
logger.debug("response.ok='%s',response.status_code=%d,response.text()=%d,response_url='%s'", response.ok, response.status_code, len(response.text), response_url)
- if ((response.ok and response.status_code == 200) or response.status_code == 410) and response.text.find("<html") > 0 and validators.domain(response_url) and domain_helper.is_in_url(domain, response_url):
+ if ((response.ok and response.status_code == 200) or response.status_code == 410) and response.text.find("<html") >= 0 and validators.domain(response_url) and domain_helper.is_in_url(domain, response_url):
logger.debug("Parsing response.text()=%d Bytes ...", len(response.text))
doc = bs4.BeautifulSoup(response.text, "html.parser")