From 6576eb1bace46d0d0a31d28a40c2fdac36a38370 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 14 Aug 2020 03:57:43 +0000 Subject: [PATCH] Adjust content-type request timeout --- apiserver/feed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/feed.py b/apiserver/feed.py index 991b7b2..97d660a 100644 --- a/apiserver/feed.py +++ b/apiserver/feed.py @@ -65,9 +65,9 @@ def get_content_type(url): try: headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0'} - return requests.get(url, headers=headers, timeout=2).headers['content-type'] + return requests.get(url, headers=headers, timeout=10).headers['content-type'] except: - return 'text/' + return '' def update_story(story, is_manual=False): res = {}