Open chaoSefat opened 1 month ago
Then get info of that. check if it's category is commoncrawl and has snippet or not.
def check_urls(url_list):
result = []
for url in url_list:
try:
response = requests.get(url, timeout=5)
if response.status_code == 200:
result.append({"link": url, "active": 1})
else:
result.append({"link": url, "active": 0})
except requests.RequestException:
result.append({"link": url, "active": 0})
return result