Archived
1
0

fix 404 errors

This commit is contained in:
jeff 2015-10-14 13:19:47 -04:00
parent bf351294b1
commit 2a9b1f3eac

View File

@ -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)