We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f63349c commit 0abea32Copy full SHA for 0abea32
check_links.py
@@ -26,21 +26,23 @@ def remove_duplicates(urls):
26
27
# Remove mailto links
28
links = [url for url in file_links if "mailto://" not in url]
29
+ linksToRequest = []
30
31
# Remove blacklisted links
32
for link in links:
33
if link in blacklisted:
- links.remove(link)
34
print(f"Removed {link}")
35
+ else:
36
+ linksToRequest.append(link)
37
38
print(f"Checking URLs from {file}")
39
40
# Remove Duplicate links
- links = remove_duplicates(links)
41
+ linksToRequest = remove_duplicates(linksToRequest)
42
43
print(f"Removing duplicate URLs from {file}")
44
- for url in links:
45
+ for url in linksToRequest:
46
try:
47
request = requests.get(url)
48
if request.status_code == 200:
0 commit comments