summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unbiased/sources/base.py2
-rw-r--r--unbiased/util.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/unbiased/sources/base.py b/unbiased/sources/base.py
index 1d54f82..b5f2d1e 100644
--- a/unbiased/sources/base.py
+++ b/unbiased/sources/base.py
@@ -61,7 +61,7 @@ class NewsSource(object):
@classmethod
def _fetch_content(cls, url):
- res = requests.get(url)
+ res = requests.get(url, timeout=3)
if res.status_code == 200:
content = res.text
else:
diff --git a/unbiased/util.py b/unbiased/util.py
index 12003b1..f3c70c0 100644
--- a/unbiased/util.py
+++ b/unbiased/util.py
@@ -79,7 +79,7 @@ def write_static_files(outDir):
def pullImage(url, index, webroot, target_width=350, target_height=200):
- res = requests.get(url)
+ res = requests.get(url, timeout=3)
if res.status_code == 200:
content = res.content
else: