[4chanarchives] add end condition for 'board' extractor (#4012)
This commit is contained in:
@@ -130,7 +130,10 @@ class _4chanarchivesBoardExtractor(Extractor):
|
|||||||
url = "{}/board/{}/{}".format(self.root, self.board, pnum)
|
url = "{}/board/{}/{}".format(self.root, self.board, pnum)
|
||||||
page = self.request(url).text
|
page = self.request(url).text
|
||||||
|
|
||||||
|
thread = None
|
||||||
for thread in text.extract_iter(page, needle, '"'):
|
for thread in text.extract_iter(page, needle, '"'):
|
||||||
yield Message.Queue, thread, data
|
yield Message.Queue, thread, data
|
||||||
|
|
||||||
|
if thread is None:
|
||||||
|
return
|
||||||
pnum += 1
|
pnum += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user