From 968ff6d24ca968b81a052b5e77b7db457c3f9a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Mon, 26 Feb 2018 13:01:05 +0100 Subject: [PATCH] More robust crawling --- crawl/crawl.py | 2 ++ histories/models.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crawl/crawl.py b/crawl/crawl.py index eadd653..2a21693 100644 --- a/crawl/crawl.py +++ b/crawl/crawl.py @@ -291,6 +291,8 @@ async def async_crawler(url, output_tree, headers=None): if sample_url not in queued and sample_url not in crawled ] + else: + print("No html received") print(crawled) output_tree += crawl_tree diff --git a/histories/models.py b/histories/models.py index 7a72ca9..e638281 100644 --- a/histories/models.py +++ b/histories/models.py @@ -244,6 +244,6 @@ def generate_history(user, start_time): new_line.full_clean() new_line.save() except ValidationError: - pass + continue return history