aboutsummaryrefslogtreecommitdiff
path: root/plugins/readms.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readms.py')
-rwxr-xr-xplugins/readms.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/readms.py b/plugins/readms.py
index 2a87b14..4a9674d 100755
--- a/plugins/readms.py
+++ b/plugins/readms.py
@@ -87,7 +87,15 @@ def download_chapter(url, download_dir):
if len(next_pages) != 1:
break
- url = "https://readms.net" + next_pages[0]
+ next_page = next_pages[0]
+ last_slash = next_page.rfind('/')
+ try:
+ if last_slash != -1 and int(next_page[last_slash+1:]) <= img_number:
+ break
+ except ValueError:
+ pass
+
+ url = "https://readms.net" + next_page
img_number += 1
with open(os.path.join(download_dir, "finished"), "w") as file: