Skip to content

Commit

Permalink
Merge pull request #56 from Tyroc/master
Browse files Browse the repository at this point in the history
Added series end as range option
  • Loading branch information
Xonshiz authored Nov 26, 2017
2 parents a9ed729 + 374299c commit 4f86cf2
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 8 deletions.
7 changes: 6 additions & 1 deletion comic_dl/sites/acQQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/comicNaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/foolSlide.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ def full_manga(self, manga_url, comic_name, sorting, download_directory, chapter
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/mangaFox.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/mangaHere.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
chapter_links = [chapter_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/rawSenManga.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/readcomicOnlineto.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ def full_series(self, comic_url, comic_name, sorting, download_directory, chapte
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down
7 changes: 6 additions & 1 deletion comic_dl/sites/stripUtopia.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ def full_series(self, source, comic_url, comic_name, sorting, download_directory
if chapter_range != "All":
# -1 to shift the episode number accordingly to the INDEX of it. List starts from 0 xD!
starting = int(str(chapter_range).split("-")[0]) - 1
ending = int(str(chapter_range).split("-")[1])

if (str(chapter_range).split("-")[1]).isdecimal():
ending = int(str(chapter_range).split("-")[1])
else:
ending = len(all_links)

indexes = [x for x in range(starting, ending)]
# [::-1] in sub_list in beginning to start this from the 1st episode and at the last, it is to reverse the list again, becasue I'm reverting it again at the end.
all_links = [all_links[::-1][x] for x in indexes][::-1]
Expand Down

0 comments on commit 4f86cf2

Please sign in to comment.