diff --git a/get_url.py b/get_url.py index 044e2d7..4eb4590 100755 --- a/get_url.py +++ b/get_url.py @@ -80,8 +80,10 @@ def filterlinks(links): continue if is_robot(url): continue - if not ishttp: - url = url_root + url + if not ishttp and url.startswith("/"): + url = url_root + url + elif not ishttp: + url = url_root + '/' + url tmplinks.append(url) reslinks = list(set(tmplinks)) return reslinks