Fix max page number determination.
This commit is contained in:
parent
fade3c20fc
commit
cf310894b5
|
@ -187,7 +187,6 @@ class BotInstance:
|
||||||
# Get a random image making sure it's not in the saved image list
|
# Get a random image making sure it's not in the saved image list
|
||||||
while True:
|
while True:
|
||||||
image_url, image_src, image_rating, cur_page_number = self.get_random_image(max_page_number=self.max_page_number)
|
image_url, image_src, image_rating, cur_page_number = self.get_random_image(max_page_number=self.max_page_number)
|
||||||
if cur_page_number < self.max_page_number:
|
|
||||||
self.max_page_number = cur_page_number
|
self.max_page_number = cur_page_number
|
||||||
if image_url is None:
|
if image_url is None:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue