Commit 48cf8976 authored by Brian Friesen's avatar Brian Friesen

util: only scrape external URLs, not internal ones

mkdocs can enforce validity of internal links itself, so we should check
only external links.
parent 7efc86ae
......@@ -20,7 +20,11 @@ def get_url(this_page):
:param this_page: html of web page
:return: urls in that page
start_link = this_page.find("a href")
# Validate only external URLs, not internal ones. (mkdocs can validate
# internal links itself.) External URLs have the "http" prefix, whereas
# internal links user relative paths.
start_link = this_page.find('a href="http')
if start_link == -1:
return None, 0
start_quote = this_page.find('"', start_link)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment