fix 404 errors
This commit is contained in:
parent
bf351294b1
commit
2a9b1f3eac
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user