瀏覽代碼

If no scheme is given for the URL, add http://

pull/24/head
Ben Kurtovic 10 年之前
父節點
當前提交
8f6a02a8f3
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      copyvios/checker.py

+ 4
- 1
copyvios/checker.py 查看文件

@@ -52,7 +52,10 @@ def _get_results(query, follow=True):
return _get_results(query, follow=False)

if query.url:
if urlparse(query.url).scheme not in ["http", "https"]:
scheme = urlparse(query.url).scheme
if not scheme and query.url[0] not in ":/":
query.url = "http://" + query.url
elif scheme not in ["http", "https"]:
query.error = "bad URI"
return
result = _do_copyvio_compare(query, page, query.url)


Loading…
取消
儲存