@@ -67,10 +67,15 @@ def _get_results(query, follow=True): | |||||
if not query.nocache: | if not query.nocache: | ||||
query.result = _get_cached_results(page, conn, mode, query.noskip) | query.result = _get_cached_results(page, conn, mode, query.noskip) | ||||
if not query.result: | if not query.result: | ||||
query.result = page.copyvio_check( | |||||
min_confidence=T_SUSPECT, max_queries=10, max_time=45, | |||||
no_searches=not use_engine, no_links=not use_links, | |||||
short_circuit=not query.noskip) | |||||
try: | |||||
query.result = page.copyvio_check( | |||||
min_confidence=T_SUSPECT, max_queries=10, max_time=45, | |||||
no_searches=not use_engine, no_links=not use_links, | |||||
short_circuit=not query.noskip) | |||||
except exceptions.SearchQueryError as exc: | |||||
query.error = "search error" | |||||
query.exception = exc | |||||
return | |||||
query.result.cached = False | query.result.cached = False | ||||
_cache_result(page, query.result, conn, mode) | _cache_result(page, query.result, conn, mode) | ||||
elif query.action == "compare": | elif query.action == "compare": | ||||
@@ -30,6 +30,10 @@ | |||||
<div id="info-box" class="red-box"> | <div id="info-box" class="red-box"> | ||||
<p>The URL <a href="${query.url | h}">${query.url | h}</a> timed out before any data could be retrieved.</p> | <p>The URL <a href="${query.url | h}">${query.url | h}</a> timed out before any data could be retrieved.</p> | ||||
</div> | </div> | ||||
% elif query.error == "search error" | |||||
<div id="info-box" class="red-box"> | |||||
<p>An error occurred while using the search engine (${query.exception}). Try reloading the page. If the error persists, <a href="${request.url | httpsfix, h}&use_engine=0">repeat the check without using the search engine</a>.</p> | |||||
</div> | |||||
% elif not query.site: | % elif not query.site: | ||||
<div id="info-box" class="red-box"> | <div id="info-box" class="red-box"> | ||||
<p>The given site (project=<b><span class="mono">${query.project | h}</span></b>, language=<b><span class="mono">${query.lang | h}</span></b>) doesn't seem to exist. It may also be closed or private. <a href="//${query.lang | h}.${query.project | h}.org/">Confirm its URL.</a></p> | <p>The given site (project=<b><span class="mono">${query.project | h}</span></b>, language=<b><span class="mono">${query.lang | h}</span></b>) doesn't seem to exist. It may also be closed or private. <a href="//${query.lang | h}.${query.project | h}.org/">Confirm its URL.</a></p> | ||||