ソースを参照

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

pull/24/head
Ben Kurtovic 12年前
親
コミット
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) return _get_results(query, follow=False)


if query.url: 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" query.error = "bad URI"
return return
result = _do_copyvio_compare(query, page, query.url) result = _do_copyvio_compare(query, page, query.url)


読み込み中…
キャンセル
保存