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 yield a bunch of articles
""" """
r = requests.get(self.url) r = requests.get(self.url)
j = r.json() if r.status_code == 200:
for t in j['threads']: j = r.json()
posts = t['posts'] for t in j['threads']:
for post in posts: posts = t['posts']
yield Article(post, self.board, self.site) for post in posts:
yield Article(post, self.board, self.site)