From 34cfde0c4ed76d5e33e58fb9cee3f2f60bb1f6a1 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 21 Feb 2019 12:57:26 -0500 Subject: [PATCH] dont fetch titles when FETCH_TITLE=False --- archivebox/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archivebox/util.py b/archivebox/util.py index 6b41c2e1..576816dd 100644 --- a/archivebox/util.py +++ b/archivebox/util.py @@ -30,6 +30,7 @@ from config import ( FETCH_SCREENSHOT, FETCH_DOM, FETCH_FAVICON, + FETCH_TITLE, FETCH_MEDIA, SUBMIT_ARCHIVE_DOT_ORG, ) @@ -237,6 +238,9 @@ def download_url(url): def fetch_page_title(url, timeout=10, progress=SHOW_PROGRESS): """Attempt to guess a page's title by downloading the html""" + if not FETCH_TITLE: + return None + try: if progress: sys.stdout.write('.')