Fix some minor invalid URLs

modify validate_markdown_links.py a little

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
This commit is contained in:
Dongliang Mu
2024-05-06 21:30:41 +08:00
parent 360a334779
commit d610e85e95
22 changed files with 61 additions and 61 deletions

View File

@@ -17,7 +17,7 @@ def check_live_url(url):
result = False
try:
ret = urlopen(url, timeout=2)
ret = urlopen(url, timeout=5)
result = (ret.code == 200)
except HTTPError as e:
print(e, file=sys.stderr)
@@ -55,9 +55,9 @@ def main(path):
print("markdown file name: " + url)
continue
if check_live_url(url):
print(url)
print(url, ": Success")
else:
print(url, file=sys.stderr)
print(url, ": Failure")
if __name__ == '__main__':
@@ -65,4 +65,4 @@ if __name__ == '__main__':
if len(sys.argv) == 2:
main(sys.argv[1])
else:
print("Choose one path as argument one")
print("Choose one path as the argument")