Skip to content

Commit

Permalink
Merge pull request #17 from FrankMaverick/main
Browse files Browse the repository at this point in the history
Add handling for 301 (redirect) HTTP response codes
  • Loading branch information
ndc-istat authored May 3, 2024
2 parents 8f14e91 + 8e72637 commit 6c3633d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def test_url():
ret = request_url(requests.head, url)
print(f"status_code: {ret}")

if ret.status_code != 200:
# Check if the response status code is 200 or 301 (redirect)
if ret.status_code not in [200, 301]:
relative_path = extract_relative_path(url, root_dir)

if relative_path:
Expand Down

0 comments on commit 6c3633d

Please sign in to comment.