From 2a9b1f3eacb5d308c665cf6d8686d3093d31f7f8 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 14 Oct 2015 13:19:47 -0400 Subject: [PATCH] fix 404 errors --- contrib/tools/archive/nntparchive/archiver.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/tools/archive/nntparchive/archiver.py b/contrib/tools/archive/nntparchive/archiver.py index fc9a14b..3602fc2 100755 --- a/contrib/tools/archive/nntparchive/archiver.py +++ b/contrib/tools/archive/nntparchive/archiver.py @@ -118,11 +118,12 @@ class Getter: yield a bunch of articles """ r = requests.get(self.url) - j = r.json() - for t in j['threads']: - posts = t['posts'] - for post in posts: - yield Article(post, self.board, self.site) + if r.status_code == 200: + j = r.json() + for t in j['threads']: + posts = t['posts'] + for post in posts: + yield Article(post, self.board, self.site)