From 52f01612e5725368b63ec36557a9ff722fa977fb Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 17 Jul 2017 20:49:34 +0200 Subject: [PATCH] Even better. --- readit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readit.py b/readit.py index bc3fb0c..beff3e6 100755 --- a/readit.py +++ b/readit.py @@ -46,7 +46,7 @@ def login(driver): def pageHandler(driver, id, page): if not loadPage("https://app.myreadit.com/reader/%s#%i" % (id, int(page)), driver): - if not loadPage("https://app.myreadit.com/reader/%s#%i" % (id, int(page) + 2), driver): + if "/ %i" % (int(page) - 1) in driver.page_source or "/ %i" (int(page) - 2) in driver.page_source: return False while not loadPage("https://app.myreadit.com/reader/%s#i" % (id, int(page)), driver): time.sleep(5)