prahul11 2023-10-13 01:42:22 +05:30
parent a39288eda0
commit 8681aee8d5
2 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class NaukriJobDetailScraper:
response = requests.get(url, headers=self.headers, timeout=self.timeout, proxies=self.proxies) response = requests.get(url, headers=self.headers, timeout=self.timeout, proxies=self.proxies)
if response.status_code == 403: if response.status_code == 403:
response = requests.get(url, headers=self.headers, timeout=self.timeout) response = requests.get(url, headers=self.headers, timeout=self.timeout)
print(f"{response.status_code} for {url}") print(f"{response.status_code} for {url}")
if response.status_code == 200: if response.status_code == 200:

View File

@ -85,6 +85,8 @@ class NaukriJobScraper:
# print(f"{response.status_code} for {url}") # print(f"{response.status_code} for {url}")
if response.status_code != 200: if response.status_code != 200:
print(response.status_code)
print(response.reason)
print(f"Error with page {start_page} for industry {industry_name}") print(f"Error with page {start_page} for industry {industry_name}")
with open(self.error_file_path, "a") as file: with open(self.error_file_path, "a") as file:
file.write(f"Error with page {start_page} for industry {industry_name}\n") file.write(f"Error with page {start_page} for industry {industry_name}\n")