fix 404 errors
This commit is contained in:
1 parent
bf351294b1
commit
2a9b1f3eac
1 file changed
+6
-5
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user