Skip to content

Commit

Permalink
Merge pull request #868 from wwarriner/fix-url
Browse files Browse the repository at this point in the history
Fix url
  • Loading branch information
Premas authored Dec 13, 2024
2 parents 95384f3 + f21e3d6 commit 70420f0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/linkchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

import pandas as pd

"""
How to use:
python ./scripts/linkchecker.py
"""

# Cleans up output of linkchecker

OUTPUT = PurePath("out")
Expand Down Expand Up @@ -108,13 +114,13 @@ def ignore_rows_containing(
# special ignore rules
df = ignore_rows_containing(
df, URL_IN_MARKDOWN, "https://doi.org", if_result_code="200"
)
) # doi.org always redirects, that's its purpose, so we ignore
df = ignore_rows_containing(
df, URL_IN_MARKDOWN, "https://anaconda.org", if_result_code="403"
)
) # if anaconda.org goes down we'll surely hear about it
df = ignore_rows_containing(
df, URL_AFTER_REDIRECTION, "https://padlock.idm.uab.edu", if_result_code="423"
)
) # padlock urls means we would need to check manually anyway

# organize
df = df.sort_values(by=[RESULT, URL_IN_MARKDOWN, MARKDOWN_FILE, LINE, COLUMN])
Expand Down

0 comments on commit 70420f0

Please sign in to comment.