From 331b05baaef3a99cee9a0de3221159992af94aeb Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 3 Oct 2014 15:57:16 -0500 Subject: [PATCH] Truncate URLs above 1024 chars. --- copyvios/checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyvios/checker.py b/copyvios/checker.py index 6b88992..a5d9f82 100644 --- a/copyvios/checker.py +++ b/copyvios/checker.py @@ -184,7 +184,7 @@ def _cache_result(page, result, conn, mode): query2 = "INSERT INTO cache VALUES (?, DEFAULT, ?, ?)" query3 = "INSERT INTO cache_data VALUES (DEFAULT, ?, ?, ?, ?)" cache_id = buffer(sha256(mode + page.get().encode("utf8")).digest()) - data = [(cache_id, source.url, source.confidence, source.skipped) + data = [(cache_id, source.url[:1024], source.confidence, source.skipped) for source in result.sources] with conn.cursor() as cursor: cursor.execute("START TRANSACTION")