├── CSS ├── nav.css └── body.css ├── Covers ├── ed.jpg ├── gbf.jpg ├── mga.jpg ├── pmg.jpg ├── tv.jpg ├── woc.jpg ├── btth.jpg ├── htrep.jpg ├── issth.jpg ├── todg.jpg ├── usaw.jpg ├── wotmw.jpg ├── Mansion.jpg ├── armtdm.jpg ├── iadwwas.jpg ├── Overgeared.jpg ├── zhan-long.jpg ├── desolate-era.jpg ├── martial-peak.jpg ├── spirit-realm.jpg ├── swallowed-star.jpg ├── versatile-mage.jpg ├── BookEatingMagician.jpg ├── Long-Live-Summons.jpg ├── bringing-the-farm.jpg ├── chaotic-sword-god.jpg ├── godanddevilworld.jpg ├── great-demon-king.jpg ├── release-that-witch.jpg ├── the-lords-empire.jpg ├── the-wizard-world.jpg ├── true-martial-world.jpg ├── castle-of-black-iron.jpg ├── againstthegods-225x300.jpg ├── heavenly-jewel-change.jpg ├── peerless-battle-spirit.jpg ├── My-Wife-is-a-Beautiful-CEO.jpg ├── chaotic-lightning-cultivation.jpg └── ancient-strengthening-technique.jpg ├── HTML ├── intro.xhtml └── intro-full.xhtml ├── README.md ├── libs ├── gsweb.py ├── gs_epub.py └── common.py ├── Novels ├── gbf.py ├── Complete │ ├── tww.py │ ├── btth.py │ ├── rtw.py │ ├── wotmw.py │ ├── hjc.py │ ├── bem.py │ ├── issth.py │ ├── woc.py │ ├── ss.py │ ├── gdw.py │ ├── usaw.py │ ├── sr.py │ ├── pmg.py │ ├── tmw.py │ ├── cobi.py │ ├── desolate.py │ └── ancient.py ├── todg.py ├── iadwwas.py ├── gdk.py ├── armtdm.py ├── tv.py ├── mga.py ├── zhan-long.py ├── overgeared.py ├── tle.py ├── chaotic.py ├── htrep.py ├── mp.py ├── vm.py ├── mwiabc.py ├── csg.py ├── atg.py ├── ed.py ├── btf.py ├── mansion.py ├── pbs.py └── lls.py ├── novel2epub.py └── LICENSE /CSS/nav.css: -------------------------------------------------------------------------------- 1 | BODY { 2 | color: white; 3 | } -------------------------------------------------------------------------------- /Covers/ed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/ed.jpg -------------------------------------------------------------------------------- /Covers/gbf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/gbf.jpg -------------------------------------------------------------------------------- /Covers/mga.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/mga.jpg -------------------------------------------------------------------------------- /Covers/pmg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/pmg.jpg -------------------------------------------------------------------------------- /Covers/tv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/tv.jpg -------------------------------------------------------------------------------- /Covers/woc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/woc.jpg -------------------------------------------------------------------------------- /Covers/btth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/btth.jpg -------------------------------------------------------------------------------- /Covers/htrep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/htrep.jpg -------------------------------------------------------------------------------- /Covers/issth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/issth.jpg -------------------------------------------------------------------------------- /Covers/todg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/todg.jpg -------------------------------------------------------------------------------- /Covers/usaw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/usaw.jpg -------------------------------------------------------------------------------- /Covers/wotmw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/wotmw.jpg -------------------------------------------------------------------------------- /Covers/Mansion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/Mansion.jpg -------------------------------------------------------------------------------- /Covers/armtdm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/armtdm.jpg -------------------------------------------------------------------------------- /Covers/iadwwas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/iadwwas.jpg -------------------------------------------------------------------------------- /Covers/Overgeared.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/Overgeared.jpg -------------------------------------------------------------------------------- /Covers/zhan-long.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/zhan-long.jpg -------------------------------------------------------------------------------- /Covers/desolate-era.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/desolate-era.jpg -------------------------------------------------------------------------------- /Covers/martial-peak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/martial-peak.jpg -------------------------------------------------------------------------------- /Covers/spirit-realm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/spirit-realm.jpg -------------------------------------------------------------------------------- /Covers/swallowed-star.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/swallowed-star.jpg -------------------------------------------------------------------------------- /Covers/versatile-mage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/versatile-mage.jpg -------------------------------------------------------------------------------- /Covers/BookEatingMagician.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/BookEatingMagician.jpg -------------------------------------------------------------------------------- /Covers/Long-Live-Summons.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/Long-Live-Summons.jpg -------------------------------------------------------------------------------- /Covers/bringing-the-farm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/bringing-the-farm.jpg -------------------------------------------------------------------------------- /Covers/chaotic-sword-god.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/chaotic-sword-god.jpg -------------------------------------------------------------------------------- /Covers/godanddevilworld.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/godanddevilworld.jpg -------------------------------------------------------------------------------- /Covers/great-demon-king.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/great-demon-king.jpg -------------------------------------------------------------------------------- /Covers/release-that-witch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/release-that-witch.jpg -------------------------------------------------------------------------------- /Covers/the-lords-empire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/the-lords-empire.jpg -------------------------------------------------------------------------------- /Covers/the-wizard-world.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/the-wizard-world.jpg -------------------------------------------------------------------------------- /Covers/true-martial-world.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/true-martial-world.jpg -------------------------------------------------------------------------------- /Covers/castle-of-black-iron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/castle-of-black-iron.jpg -------------------------------------------------------------------------------- /Covers/againstthegods-225x300.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/againstthegods-225x300.jpg -------------------------------------------------------------------------------- /Covers/heavenly-jewel-change.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/heavenly-jewel-change.jpg -------------------------------------------------------------------------------- /Covers/peerless-battle-spirit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/peerless-battle-spirit.jpg -------------------------------------------------------------------------------- /Covers/My-Wife-is-a-Beautiful-CEO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/My-Wife-is-a-Beautiful-CEO.jpg -------------------------------------------------------------------------------- /Covers/chaotic-lightning-cultivation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/chaotic-lightning-cultivation.jpg -------------------------------------------------------------------------------- /Covers/ancient-strengthening-technique.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GatoLoko/novel2epub/HEAD/Covers/ancient-strengthening-technique.jpg -------------------------------------------------------------------------------- /HTML/intro.xhtml: -------------------------------------------------------------------------------- 1 |
2 |Title: ${title}
9 |Copyright by: ${author}
10 |As published in: ${url}
11 |Synopsis: ${synopsis}
12 | 13 | -------------------------------------------------------------------------------- /CSS/body.css: -------------------------------------------------------------------------------- 1 | @namespace epub "http://www.idpf.org/2007/ops"; 2 | 3 | /* Commented out for test 4 | body { 5 | font-family: Verdana, Helvetica, Arial, sans-serif; 6 | } 7 | */ 8 | 9 | p { 10 | margin-top: 1.5em; 11 | } 12 | 13 | h1 { 14 | text-align: center; 15 | } 16 | 17 | h2 { 18 | text-align: left; 19 | text-transform: uppercase; 20 | font-weight: 200; 21 | } 22 | 23 | ol { 24 | list-style-type: none; 25 | margin: 0; 26 | } 27 | 28 | ol > li { 29 | margin-top: 0.3em; 30 | } 31 | 32 | ol > li > span { 33 | font-weight: bold; 34 | } 35 | 36 | ol > li > ol { 37 | margin-left: 0.5em; 38 | } -------------------------------------------------------------------------------- /HTML/intro-full.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 |Title: ${title}
15 |Copyright by: ${author}
16 |As published in: ${url}
17 |Synopsis: ${synopsis}
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Readme 2 | 3 | ## What is Novel2Epub 4 | 5 | Novel2Epub downloads chinese novels and converts them into Epub files you can 6 | use with your favorite ebook reader. This is meant for personal use only. 7 | 8 | ## Why Novel2Epub? 9 | 10 | Most sites don't offer an option to download a story. This forces you to remain 11 | online while reading the stories. 12 | 13 | Having those stories in epub format allows storing them as a backup, offline 14 | reading and self publication (for story author or copyright owners). 15 | 16 | ## Disclaimer 17 | 18 | The generated epubs are meant for personal use ONLY. DO NOT SHARE them without 19 | permision from their author or copyright owner. 20 | 21 | ## Requeriments 22 | 23 | This script has the following dependencies: 24 | 25 | - python3 26 | - BeatifulSoup4 27 | - ebooklib 28 | 29 | ## Running it 30 | 31 | You can run the python script doing: 32 | `python3 novel2epub.py novel-module volume` 33 | 34 | > `novel-module` should be your the name of the module for the story, for 35 | > example, for "The book eating magician" it would be: `bem` 36 | 37 | > `volume` should be the volume number you want to download, for example: `1` 38 | 39 | ## Output 40 | 41 | After the script finished, you will have your epub file inside the current 42 | folder. 43 | 44 | -------------------------------------------------------------------------------- /libs/gsweb.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ==== 4 | Custom networking functions 5 | ==== 6 | 7 | Mostly customized http request for now 8 | """ 9 | 10 | # import brotli 11 | import gzip 12 | from io import BytesIO 13 | import platform 14 | import socket 15 | import urllib.request 16 | import urllib.parse 17 | import urllib.error 18 | 19 | from bs4 import BeautifulSoup 20 | 21 | 22 | # set timeout to 10 seconds 23 | socket.setdefaulttimeout(10) 24 | 25 | # Create our own User-Agent string. We may need to fake this if a server tryes 26 | # to mess with us. 27 | USER_AGENT = 'Mozilla/5.0 compatible (' + platform.system() + ' ' + \ 28 | platform.machine() + '; Novel-Indexer-Bot)' 29 | 30 | 31 | # Provide a function to replace the default User-Agent: 32 | def set_user_agent(agent): 33 | global USER_AGENT 34 | USER_AGENT = agent 35 | 36 | 37 | def get_url(url): 38 | tryes = 5 39 | response = None 40 | # Build our request 41 | request = urllib.request.Request(url) 42 | # Accept compressed content 43 | request.add_header('Accepting-encoding', 'gzip, br') 44 | # Use our custom User-Agent 45 | request.add_header('User-Agent', USER_AGENT) 46 | # Add DoNotTrack header, do the right thing even if nobody cares 47 | request.add_header('DNT', '1') 48 | 49 | while tryes > 0: 50 | try: 51 | response = urllib.request.urlopen(request) 52 | break 53 | except socket.timeout: 54 | tryes -= 1 55 | except urllib.error.URLError as error: 56 | if isinstance(error.reason, socket.timeout): 57 | tryes -= 1 58 | else: 59 | raise SystemExit("An URL error happened: -%s-" % error.reason)\ 60 | from error 61 | 62 | encoding = response.info().get('Content-Encoding') 63 | if encoding == 'gzip': 64 | buffer = BytesIO(response.read()) 65 | content = gzip.GzipFile(fileobj=buffer) 66 | elif encoding == 'br': 67 | # content = brotli.decompress(response.content) 68 | content = response.text 69 | print("Brotli: " + content) 70 | else: 71 | content = response.read() 72 | response.close() 73 | return content 74 | 75 | 76 | def get_soup(url): 77 | html = get_url(url) 78 | soup = BeautifulSoup(html, 'lxml') 79 | return soup 80 | -------------------------------------------------------------------------------- /Novels/gbf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 0, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 318), 33 | } 34 | 35 | origin = 'http://www.wuxiaworld.co/Jikuu-Mahou-de-Isekai-to-Chikyuu-wo-Ittarikitari/' 36 | author = 'Katsu' 37 | cover_file = 'Covers/gbf.jpg' 38 | title = 'Going Back and Forth Between Earth and The Other World with Space Time Magic - Vol' 39 | 40 | synopsis_text = """ 41 | Though he received the skills necessary to teleport across worlds, the king who 42 | performed the summoning ritual attempted to trick him into wearing a slavery 43 | collar, this annoyed him so he kidnapped the princess and returned to 44 | Earth. 45 | 46 |While traveling between worlds with the skills he received, together with 47 | the kidnapped Princess and his little sister, they lived happily ever after? 48 | """ 49 | 50 | 51 | def genlist(start, end): 52 | global origin 53 | list_page = common.get_html(origin) 54 | chapterlist = [] 55 | for i in range(start, end+1): 56 | # print(i) 57 | text = '^Chapter %s – .*' % str(i) 58 | link = list_page.find('a', text=re.compile(text)) 59 | url = origin + link['href'].split("/")[-1] 60 | chapterlist.append(url) 61 | return chapterlist 62 | 63 | 64 | def clean(content): 65 | credline = re.compile(r'Translator:.*Editor:.*') 66 | for i in content.find_all(text=credline): 67 | i.replaceWith('') 68 | return content 69 | -------------------------------------------------------------------------------- /Novels/Complete/tww.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 17/11/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | 28 | Volume = common.Volume 29 | 30 | volumes = {'1': Volume('1', 1, 83), 31 | '2': Volume('2', 84, 200), 32 | '3': Volume('3', 201, 300), 33 | '4': Volume('4', 301, 400), 34 | '5': Volume('5', 401, 500), 35 | '6': Volume('6', 501, 600), 36 | '7': Volume('7', 601, 646), 37 | } 38 | 39 | origin = 'http://www.wuxiaworld.co/The-Wizard-World/' 40 | author = 'Get Lost (滚开)' 41 | cover_file = 'Covers/the-wizard-world.jpg' 42 | title = 'The Wizard World - Vol' 43 | 44 | synopsis_text = """ 45 | Ye Song, who once lived in a technologically-advanced world, died and 46 | reincarnated into a noble teenager’s body in another world.
47 | 48 |A fantasy world filled with magic!
49 | 50 |A series of events filled with tragedy, action, etc. began to unfold one 51 | after the other when he fatefully encountered one of the most guarded secrets 52 | of this world, obtaining the legendary power of Wizards.
53 | 54 |Watch how he reaches unreachable heights as a powerful Wizard in this new 55 | world. 56 | """ 57 | 58 | 59 | def genlist(start, end): 60 | global origin 61 | list_page = common.get_html(origin) 62 | chapterlist = [] 63 | for i in range(start, end+1): 64 | if i < 632: 65 | text = 'Chapter ' + str(i) + ':.*' 66 | else: 67 | text = '^' + str(i) + '.*' 68 | link = list_page.find('a', text=re.compile(text)) 69 | url = origin + link['href'].split("/")[-1] 70 | chapterlist.append(url) 71 | return chapterlist 72 | 73 | 74 | def clean(content): 75 | return content 76 | -------------------------------------------------------------------------------- /Novels/Complete/btth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | 27 | volumes = {'1': Volume('1', 1, 99), 28 | '2': Volume('2', 100, 199), 29 | '3': Volume('3', 200, 299), 30 | '4': Volume('4', 300, 399), 31 | '5': Volume('5', 400, 499), 32 | '6': Volume('6', 500, 599), 33 | '7': Volume('7', 600, 699), 34 | '8': Volume('8', 700, 799), 35 | '9': Volume('9', 800, 899), 36 | '10': Volume('10', 900, 999), 37 | '11': Volume('11', 1000, 1099), 38 | '12': Volume('12', 1100, 1199), 39 | '13': Volume('13', 1200, 1299), 40 | '14': Volume('14', 1300, 1399), 41 | '15': Volume('15', 1400, 1499), 42 | '16': Volume('16', 1500, 1599), 43 | '17': Volume('17', 1600, 1648), 44 | } 45 | 46 | origin = 'http://www.wuxiaworld.com/novel/battle-through-the-heavens/' 47 | author = 'Heavenly Silkworm Potato (天蚕土豆)' 48 | cover_file = 'Covers/btth.jpg' 49 | title = 'Battle through the heavens - Vol' 50 | 51 | synopsis_text = """ 52 | In a land where no magic is present. A land where the strong make the rules 53 | and the weak have to obey. A land filled with alluring treasures and beauty, 54 | yet also filled with unforeseen danger. Three years ago, Xiao Yan, who had 55 | shown talents none had seen in decades, suddenly lost everything. His powers, 56 | his reputation, and his promise to his mother. What sorcery has caused him to 57 | lose all of his powers? And why has his fiancee suddenly shown up? 58 | """ 59 | 60 | 61 | def genlist(start, end): 62 | global origin 63 | chapterlist = [] 64 | for i in range(start, end+1): 65 | url = origin + 'btth-chapter-' + str(i) 66 | chapterlist.append(url) 67 | return chapterlist 68 | 69 | 70 | def clean(content): 71 | return content 72 | -------------------------------------------------------------------------------- /Novels/Complete/rtw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 88), 30 | '2': Volume('2', 89, 96), 31 | '3': Volume('3', 97, 481), 32 | '4': Volume('4', 482, 825), 33 | '5': Volume('5', 826, 1218), 34 | '6': Volume('6', 1219, 1498), 35 | # This novel ends with chapter 1498 36 | } 37 | 38 | origin = 'http://www.wuxiaworld.co/Release-that-Witch/' 39 | author = 'Er Mu (二目)' 40 | cover_file = 'Covers/release-that-witch.jpg' 41 | title = 'Release that witch - Vol' 42 | 43 | synopsis_text = """ 44 | Chen Yan travels through time, only to end up becoming an honorable prince in 45 | the Middle Ages of Europe. Yet this world was not quite as simple as he 46 | thought. Witches with magical powers abound, and fearsome wars between churches 47 | and kingdoms rage throughout the land.
48 | 49 |Roland, a prince regarded as hopeless by his own father and assigned to the 50 | worst fief, spends his time developing a poor and backward town into a strong 51 | and modern city, while fighting against his siblings for the throne and 52 | absolute control over the kingdom. Join Roland as he befriends and allies with 53 | witches and, through fighting and even farming, pushes back invaders coming 54 | from the realm of evil. 55 | """ 56 | 57 | 58 | def genlist(start, end): 59 | global origin 60 | list_page = common.get_html(origin) 61 | chapterlist = [] 62 | for i in range(start, end+1): 63 | # print(i) 64 | text = '^%s .*' % str(i) 65 | link = list_page.find('a', text=re.compile(text)) 66 | url = origin + link['href'].split("/")[-1] 67 | chapterlist.append(url) 68 | return chapterlist 69 | 70 | 71 | def clean(content): 72 | credline = re.compile(r'Translator:.*Editor:.*') 73 | for i in content.find_all(text=credline): 74 | i.replaceWith('') 75 | return content 76 | -------------------------------------------------------------------------------- /Novels/todg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | 27 | volumes = {'1': Volume('1', 1, 100), 28 | '2': Volume('2', 101, 200), 29 | '3': Volume('3', 201, 300), 30 | '4': Volume('4', 301, 400), 31 | '5': Volume('5', 401, 496), 32 | # This author pisses me off, holding back the novel while the manga 33 | # sloooooowly catches up. 34 | } 35 | 36 | origin = 'http://www.wuxiaworld.com/novel/tales-of-demons-and-gods/' 37 | author = 'Mad Snail (发飙的蜗牛)' 38 | cover_file = 'Covers/todg.jpg' 39 | title = 'Tales of Demons and Gods - Vol' 40 | 41 | synopsis_text = """ 42 | Killed by a Sage Emperor and reborn as his 13 year old self, Nie Li was 43 | given a second chance at life. A second chance to change everything, 44 | save his loved ones and his beloved city. He shall once again battle with 45 | the Sage Emperor to avenge his death. With the vast knowledge he accumulated 46 | in his previous life, he shall have a new starting point. Although he 47 | started as the weakest, without a doubt, he will climb the steps towards the 48 | strongest.
49 | 50 |Cultivating the strongest cultivation technique, wielding the strongest 51 | demon spirits, he shall reach the pinnacle of Martial Arts. Enmities of the 52 | past will be settled in this new lifetime.
53 | 54 |“Since I’m back, then in this lifetime, I shall become the King of Gods that 55 | dominates everything. Let everything else tremble beneath my feet!” 56 | """ 57 | 58 | 59 | def genlist(start, end): 60 | global origin 61 | chapterlist = [] 62 | for i in range(start, end+1): 63 | url = origin + 'tdg-chapter-' + str(i) 64 | # if i >= 489: 65 | # # url = origin + 'tdg-chapter-' + str(i+1) 66 | # url = origin + 'tdg-chapter-' + str(i+2) 67 | if i == 278: 68 | url = origin + 'tdg-chapter-' + str(i) + "-1" 69 | chapterlist.append(url) 70 | return chapterlist 71 | 72 | 73 | def clean(content): 74 | return content 75 | -------------------------------------------------------------------------------- /Novels/Complete/wotmw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | 27 | volumes = {'1': Volume('1 - Transmigration', 28 | 1, 287), 29 | '2': Volume('2 - Twilight zone', 30 | 288, 391), 31 | '3': Volume('3 - Morning Star chronicles', 32 | 392, 628), 33 | '4': Volume('4 - Passage of bloodlines', 34 | 629, 786), 35 | '5': Volume('5 - World of gods', 36 | 787, 1043), 37 | '6': Volume('6 - Final war', 38 | 1044, 1200) 39 | } 40 | 41 | origin = 'http://www.wuxiaworld.com/novel/warlock-of-the-magus-world/' 42 | author = 'Wen Chao Gong/Plagiarist (文抄公)' 43 | cover_file = 'Covers/wotmw.jpg' 44 | title = 'Warlock Of The Magus World - Vol' 45 | 46 | synopsis_text = """ 47 | What happens when a scientist from a futuristic world reincarnates in a 48 | World of Magic and Knights?
49 | 50 |An awesome MC — that’s what happens!
51 | 52 |A scientist’s goal is to explore the secrets of the universe, and this is 53 | exactly what Leylin sets out to do when he is reincarnated. Dark, cold and 54 | calculating, he makes use of all his resources as he sets off on his 55 | adventures to meet his goal.
56 | 57 |Face? Who needs that… Hmmm… that guy seems too powerful for me to take on 58 | now… I better keep a low profile for now.
59 | 60 |You want me to help you? Sure… but what benefit can I get out of it? 61 | Nothing? Bye.
62 | 63 |Hmmm… that guy looks like he might cause me problems in the future. Should I 64 | let him off for now and let him grow into someone that can threaten me… 65 | Nahhh. *kill* 66 | """ 67 | 68 | 69 | def genlist(start, end): 70 | global origin 71 | chapterlist = [] 72 | for i in range(start, end+1): 73 | url = origin + 'wmw-chapter-' + str(i) + '/' 74 | chapterlist.append(url) 75 | return chapterlist 76 | 77 | 78 | def clean(content): 79 | return content 80 | -------------------------------------------------------------------------------- /Novels/iadwwas.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 314), 33 | } 34 | 35 | origin = 'http://www.wuxiaworld.co/In-a-Different-World-with-a-Smartphone/' 36 | author = 'Ming Yu (明宇)' 37 | cover_file = 'Covers/iadwwas.jpg' 38 | title = 'In a different world with a smartphone - Vol' 39 | 40 | synopsis_text = """ 41 | After a freak accident involving some lightning winds up zapping him dead, 42 | 15-year-old Mochizuki Touya wakes up to find himself face-to-face with God. “I 43 | am afraid to say that I have made a bit of a blunder…” laments the old coot. 44 | But all is not lost! God says that he can reincarnate Touya into a world of 45 | fantasy, and as a bonus, he gets to bring his smartphone along with! So begins 46 | Touya’s adventure in a new, anachronistic pseudo-medieval world. Friends! 47 | Laughs! Tears! Inexplicable Deus ex Machina! He sets off on a journey full of 48 | wonder as he absentmindedly travels from place to place, following whatever 49 | goal catches his fancy. The curtains lift on an epic tale of swords, sorcery, 50 | and smartphone apps! 51 | """ 52 | 53 | 54 | def genlist(start, end): 55 | global origin 56 | list_page = common.get_html(origin) 57 | chapterlist = [] 58 | for i in range(start, end+1): 59 | # print(i) 60 | text = '^Chapter %s: .*' % str(i) 61 | if i == 34: 62 | text = '^Chatper %s: .*' % str(i) 63 | elif i >= 312: 64 | text = '^Chapter %s' % str(i) 65 | if i in [187, 300]: # Skip missing chapters 66 | continue 67 | link = list_page.find('a', text=re.compile(text)) 68 | url = origin + link['href'] 69 | chapterlist.append(url) 70 | return chapterlist 71 | 72 | 73 | def clean(content): 74 | credline = re.compile(r'Translator:.*Editor:.*') 75 | for i in content.find_all(text=credline): 76 | i.replaceWith('') 77 | return content 78 | -------------------------------------------------------------------------------- /Novels/gdk.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2019 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 0, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1026), 40 | # 41 | # This novel ends in chapter 1027. 42 | } 43 | 44 | origin = 'http://www.wuxiaworld.co/Great-Demon-King/' 45 | author = 'Ni Cang Tian (逆蒼天)' 46 | cover_file = 'Covers/great-demon-king.jpg' 47 | title = 'Great Demon King - Vol' 48 | 49 | synopsis_text = """ 50 | “If I don’t die… I swear I will act on all my evil thoughts..”
51 | 52 |Not exactly everyone’s typical thought when they’re about to die. What will 53 | a cowardly young man do when reincarnated with the evil powers to redefine his 54 | destiny? Can the natural kindness of human nature triumph over evil? Will he 55 | become the cold-blooded demon king of legend, or will he forge his own path and 56 | rain down another kind of terror? 57 | """ 58 | 59 | 60 | def genlist(start, end): 61 | global origin 62 | list_page = common.get_html(origin) 63 | chapterlist = [] 64 | for i in range(start, end+1): 65 | # print(i) 66 | if i == 0: 67 | text = '^prologue' 68 | elif i in [424, 593, 621, 760]: 69 | text = '^Chapter %s' % str(i) 70 | elif i == 860: 71 | text = '^GDK 860' 72 | elif i == 868: 73 | text = '^Chapter868' 74 | elif i in [969, 1011]: 75 | continue 76 | elif i == 1018: 77 | text = '^Chapter Sneaky' 78 | else: 79 | text = '^Chapter %s: .*' % str(i) 80 | link = list_page.find('a', text=re.compile(text)) 81 | url = origin + link['href'].split("/")[-1] 82 | chapterlist.append(url) 83 | return chapterlist 84 | 85 | 86 | def clean(content): 87 | return content 88 | -------------------------------------------------------------------------------- /Novels/Complete/hjc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 09/05/18 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | import common 28 | import re 29 | 30 | Volume = common.Volume 31 | 32 | volumes = {'1': Volume('1', 1, 27), 33 | '2': Volume('2', 28, 56), 34 | '3': Volume('3', 57, 84), 35 | '4': Volume('4', 85, 96), 36 | '5': Volume('5', 97, 100), 37 | '6': Volume('6', 101, 200), 38 | '7': Volume('7', 201, 300), 39 | '8': Volume('8', 301, 400), 40 | '9': Volume('9', 401, 500), 41 | '10': Volume('10', 501, 600), 42 | '11': Volume('11', 601, 700), 43 | '12': Volume('12', 701, 800), 44 | '13': Volume('13', 801, 848), 45 | } 46 | 47 | origin = 'http://www.wuxiaworld.co/Heavenly-Jewel-Change/' 48 | author = 'Tang Jia San Shao (唐家三少)' 49 | cover_file = 'Covers/heavenly-jewel-change.jpg' 50 | title = 'Heavenly Jewel Change - Vol' 51 | 52 | synopsis_text = """ 53 | Every human has their Personal Jewel of power, when awakened it can either be 54 | an Elemental Jewel or Physical Jewel. They circle the right and left wrists 55 | like bracelets of power.
56 | 57 |Heavenly Jewels are like the twins born, meaning when both Elemental and 58 | Physical Jewels are Awakened for the same person, the pair is known as Heavenly 59 | Jewels.
60 | 61 |Those who have the Physical Jewels are known as Physical Jewel Masters, those 62 | with Elemental Jewels are Elemental Jewel Masters, and those who train with 63 | Heavenly Jewels are naturally called Heavenly Jewel Masters.
64 | 65 |Heavenly Jewel Masters have a highest level of 12 pairs of jewels, as such 66 | their training progress is known as Heavenly Jewels 12 Changes.
67 | 68 |Our MC here is an archer who has such a pair of Heavenly Jewels. 69 | """ 70 | 71 | 72 | def genlist(start, end): 73 | global origin 74 | list_page = common.get_html(origin) 75 | chapterlist = [] 76 | for i in range(start, end+1): 77 | text = '^%s .*' % str(i) 78 | link = list_page.find('a', text=re.compile(text)) 79 | url = origin + link['href'].split("/")[-1] 80 | chapterlist.append(url) 81 | return chapterlist 82 | 83 | 84 | def clean(content): 85 | return content 86 | -------------------------------------------------------------------------------- /Novels/Complete/bem.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 31/07/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1 - ', 30 | 1, 26), 31 | '2': Volume('2 - ', 32 | 27, 48), 33 | '3': Volume('3 - ', 34 | 49, 71), 35 | '4': Volume('4 - ', 36 | 72, 94), 37 | '5': Volume('5 - ', 38 | 95, 117), 39 | '6': Volume('6 - ', 40 | 118, 140), 41 | '7': Volume('7 - ', 42 | 141, 162), 43 | '8': Volume('8 - ', 44 | 163, 183), 45 | '9': Volume('9 - ', 46 | 184, 203), 47 | '10': Volume('10 - ', 48 | 204, 224), 49 | '11': Volume('11 - ', 50 | 225, 247), 51 | '12': Volume('12 - ', 52 | 248, 269), 53 | '13': Volume('13 - ', 54 | 270, 290), 55 | '14': Volume('14 - ', 56 | 291, 313), 57 | '15': Volume('15 - ', 58 | 314, 335), 59 | '16': Volume('16 - ', 60 | 336, 356), 61 | '17': Volume('17 - ', 62 | 357, 379), 63 | '18': Volume('18 - ', 64 | 380, 400) 65 | } 66 | 67 | origin = 'http://www.wuxiaworld.com/novel/the-book-eating-magician/' 68 | author = 'Mekenlo (메켄로)' 69 | cover_file = 'Covers/BookEatingMagician.jpg' 70 | title = 'The Book Eating Magician - Vol' 71 | 72 | synopsis_text = """ 73 | [‘Lightning Magic Primer’ has been consumed. Your understanding is very high.] 74 | [The 2nd Circle magic ‘Lightning Bolt’ has been acquired.]
75 | 76 |The unprecedented magician who will eat all the magic books of the world has 77 | appeared. 78 | """ 79 | 80 | 81 | def genlist(start, end): 82 | global origin 83 | chapterlist = [] 84 | for i in range(start, end+1): 85 | if i == 94: 86 | url = origin + "bem-chapter-4-1" 87 | else: 88 | url = origin + "bem-chapter-" + str(i) 89 | chapterlist.append(url) 90 | return chapterlist 91 | 92 | 93 | def clean(content): 94 | return content 95 | -------------------------------------------------------------------------------- /Novels/Complete/issth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 18/12/18 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1 - Patriarch Reliance', 30 | 1, 95), 31 | '2': Volume('2 - Cutting into the Southern Domain', 32 | 96, 204), 33 | '3': Volume('3 - The honor of Violet Fate', 34 | 205, 313), 35 | '4': Volume('4 - Five color Paragon', 36 | 314, 628), 37 | '5': Volume('5 - Nirvanic Rebirth. Blood everywhere!', 38 | 629, 800), 39 | '6': Volume('6 - Fame that rocks the Ninth Mountain; the path to' + 40 | ' True Immortality', 41 | 801, 1004), 42 | '7': Volume('7 - Immortal Ancient builds a bridge leaving the' + 43 | ' Ninth Mountain', 44 | 1005, 1211), 45 | '8': Volume('8 - My Mountain and Sea realm', 46 | 1212, 1409), 47 | '9': Volume('9 - The demon sovereign returns; the peak of the' + 48 | ' vast expanse!', 49 | 1410, 1557), 50 | '10': Volume('10 - I watch blue seas become lush fields', 51 | 1558, 1614), 52 | } 53 | 54 | origin = 'http://www.wuxiaworld.com/novel/i-shall-seal-the-heavens/' 55 | author = 'Er Gen (耳根)' 56 | cover_file = 'Covers/issth.jpg' 57 | title = 'I shall seal the heavens - Vol' 58 | 59 | synopsis_text = """ 60 | “What I want, the Heavens shall not lack!”
61 | 62 |“What I don’t want, had better not exist in the Heavens!”
63 | 64 |This is a story which originates between the Eighth and Ninth Mountains, the 65 | world in which the strong prey upon the weak.
66 | 67 |“My Name is Meng Hao! The Ninth Generation Demon Sealer, I shall seal the 68 | Heavens!“ 69 | """ 70 | 71 | 72 | def genlist(start, end): 73 | global origin 74 | chapterlist = [] 75 | currentvol = '' 76 | for key, value in volumes.items(): 77 | if value.first is start: 78 | currentvol = key 79 | for i in range(start, end+1): 80 | # Chapter 583 is merged into 582. Chapter 1377 is missing entirelly. 81 | if i in [583, 1377]: 82 | continue 83 | url = origin + "issth-book-" + str(currentvol) + "-chapter-" + str(i) 84 | if i == 582: 85 | url = url + "-0583" 86 | chapterlist.append(url) 87 | return chapterlist 88 | 89 | 90 | def clean(content): 91 | return content 92 | -------------------------------------------------------------------------------- /Novels/armtdm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 24/01/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1', 30 | 100, 114), 31 | '2': Volume('2', 32 | 201, 211), 33 | '3': Volume('3', 34 | 301, 311), 35 | '4': Volume('4', 36 | 401, 416), 37 | '5': Volume('5', 38 | 501, 516), 39 | '6': Volume('6', 40 | 601, 611), 41 | '7': Volume('7', 42 | 701, 711), 43 | '8': Volume('8', 44 | 801, 815), 45 | } 46 | 47 | origin = 'http://stabbingwithasyringe.home.blog/translations/tower-dungeon-management/' 48 | author = 'Kurisutara Sakurai (クリスタラー桜井)' 49 | cover_file = 'Covers/armtdm.jpg' 50 | title = 'A reincarnated mage\'s tower dungeon management - Vol' 51 | 52 | synopsis_text = """ 53 | An otaku with a hobby of masturbating was reincarnated as the son of a great 54 | mage. As soon as he was born in this life, he vowed with a goal of embracing 55 | women till his death.
56 | 57 |That said, when he became 20 years old, the Demon Lord which was sealed by 58 | his ancestors revived, and now it is his role to seal it once again.
59 | 60 |And that demon lord is sealed in a tower dungeon that is rumored to be 61 | impossible to capture.
62 | 63 |However, by an unexpected coincidence, he had found out that the Demon Lord 64 | is also one of him, a kindred spirit from within, so he joined her instead and 65 | filled several traps in the tower dungeon, and thus they enjoyed a s*x spree 66 | with all the women coming over! 67 | """ 68 | 69 | 70 | def genlist(start, end): 71 | origin = 'https://stabbingwithasyringe.home.blog/' 72 | chapterlist = [] 73 | for i in range(start, end+1): 74 | if i == 100: 75 | url = origin + 'mage-tower-management-prologue/' 76 | chapterlist.append(url) 77 | elif i == 815: 78 | url = origin + "translations/tower-dungeon-management/" + \ 79 | "mage-tower-management-epilogue/" 80 | chapterlist.append(url) 81 | else: 82 | url = origin + "translations/tower-dungeon-management/" + \ 83 | "mage-tower-management-volume-" + str(start)[0] + \ 84 | "-chapter-" + str(i)[1:].lstrip('0') + "/" 85 | chapterlist.append(url) 86 | return chapterlist 87 | 88 | 89 | def clean(content): 90 | for i in content.find_all('script'): 91 | i.decompose() 92 | return content 93 | -------------------------------------------------------------------------------- /Novels/Complete/woc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2021 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/21 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 633), 36 | } 37 | 38 | origin = 'https://www.wuxiaworld.co/While-Others-Cultivate,-I-Use-My-Unique-RPG-Leveling-System-to-Cultivate-Smut-Romance-With-Their-Girlfriends!/' 39 | author = 'MotivatedSloth' 40 | cover_file = 'Covers/woc.jpg' 41 | title = 'While others cultivate, I use my unique RPG leveling system to cultivate smut romance with their girlfriends - Vol' 42 | 43 | synopsis_text = """ 44 | Did I reincarnate? Or was I transported to an Isekai cultivation world? To be 45 | honest, I have no clue!
46 | 47 |What matters is that I turned from being useless, bullied, and trash, to 48 | fully-fledged garbage in my new cultivation world!
49 | 50 |But what is this strange bleep that keeps ringing in my ears? Is this some 51 | kind of system? Oh God! Did you gift me such a cliché, right at the start of my 52 | journey?
53 | 54 |Wait, why are you trying to kill me? Did I do something to you? Stand back 55 | or I will be forced to use unstoppable Exhudia!
56 | 57 |Tell me, what did she do for you to treat your significant other in this 58 | way? Let me show you how girlfriends should be taken care of!
59 | 60 |Wait, everyone was always telling me that demons are bad, so why is this 61 | demonic queen trying to seduce me? Wait! KEEP YOUR HANDS AWAY FROM MY PRECIOUS 62 | SWORD!
63 | 64 |I just came back from a mission and was promised at least a half a year of 65 | break. Why are you bothering me again with something as silly as subjugating a 66 | devil general? 67 | """ 68 | 69 | 70 | def genlist(start, end): 71 | global origin 72 | list_page = common.get_html(origin) 73 | chapterlist = [] 74 | for i in range(start, end+1): 75 | # print(i) 76 | if i in [605, ]: 77 | continue 78 | text = '^%s .*' % str(i) 79 | link = list_page.find('a', text=re.compile(text)) 80 | url = origin + link['href'].split("/")[-1] 81 | chapterlist.append(url) 82 | chapterlist = list(dict.fromkeys(chapterlist)) 83 | return chapterlist 84 | 85 | 86 | def clean(content): 87 | credline = re.compile(r'Translator:.*Editor:.*') 88 | for i in content.find_all(text=credline): 89 | i.replaceWith('') 90 | return content 91 | -------------------------------------------------------------------------------- /Novels/tv.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2018 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 09/01/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import re 27 | 28 | volumes = {'1': Volume('1', 1, 100), 29 | '2': Volume('2', 101, 200), 30 | '3': Volume('3', 201, 300), 31 | '4': Volume('4', 301, 400), 32 | '5': Volume('5', 401, 500), 33 | '6': Volume('6', 501, 600), 34 | '7': Volume('7', 601, 700), 35 | '8': Volume('8', 701, 800), 36 | '9': Volume('9', 801, 900), 37 | '10': Volume('10', 901, 1000), 38 | '11': Volume('11', 1001, 1100), 39 | '12': Volume('12', 1101, 1200), 40 | '13': Volume('13', 1201, 1201), 41 | # 42 | '14': Volume('14', 1301, 1301), 43 | '15': Volume('15', 1401, 1401), 44 | '16': Volume('16', 1501, 1501), 45 | '17': Volume('17', 1601, 1601), 46 | '18': Volume('18', 1701, 1701), 47 | '19': Volume('19', 1801, 1801), 48 | '20': Volume('20', 1901, 1901), 49 | '21': Volume('21', 2001, 2001), 50 | '22': Volume('22', 2101, 2101), 51 | '23': Volume('23', 2201, 2201), 52 | '24': Volume('24', 2301, 2301), 53 | '25': Volume('25', 2401, 2401), 54 | '26': Volume('26', 2501, 2501), 55 | '27': Volume('27', 2601, 2601) 56 | # This novel ends with chapter 2621 57 | } 58 | 59 | origin = 'http://www.wuxiaworld.com/novel/tranxending-vision/' 60 | author = 'Li Xianyu (李闲鱼)' 61 | cover_file = 'Covers/tv.jpg' 62 | title = 'TranXending Vision - Vol' 63 | 64 | synopsis_text = """ 65 | Xia Lei, whose parents were no longer around, had to work hard to support 66 | himself and his sister. One day, he got into an accident at work which burnt 67 | his left eye. After he awoke in the hospital bed, he discovered that his eye 68 | was not blind – it gained abilities! Now, he is using these abilities to right 69 | wrongs and make a better life for himself and others. Will Xia Lei triumph over 70 | the corrupt and privileged with his newfound power?
71 | 72 |I am destined to be the protagonist of this era! 73 | """ 74 | 75 | april1st = re.compile(r"^(Rezydencja)|(Szybko)|(Następnie)|(Mają)|(W międzyczasie)|(PEW PEW PEW.)|(Tatuś)|(„Idź)|(Hiena: OK.)") 76 | 77 | 78 | def genlist(start, end): 79 | global origin 80 | chapterlist = [] 81 | for i in range(start, end+1): 82 | url = origin + 'tv-chapter-' + str(i) 83 | chapterlist.append(url) 84 | return chapterlist 85 | 86 | 87 | def clean(content): 88 | for i in content.find_all(text=april1st): 89 | i.replaceWith("") 90 | return content 91 | -------------------------------------------------------------------------------- /Novels/mga.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | 27 | volumes = {'1': Volume('1 - Battle of dignity', 28 | 1, 264), 29 | '2': Volume('2 - Sweeping through the Nine Provinces', 30 | 265, 548), 31 | '3': Volume('3 - Eastern Sea region', 32 | 549, 1004), 33 | '4': Volume('4 - A new journey', 34 | 1005, 1558), 35 | '5': Volume('5 - Battle for Overlord', 36 | 1559, 2148), 37 | '6': Volume('6 - Hundred refining ordinary realm', 38 | 2149, 2672), 39 | '7': Volume('7 - Return of the discarded child', 40 | 2673, 3108), 41 | '8': Volume('8 - Battle of prophecy', 42 | 3109, 3764), 43 | '9': Volume('9 - Birth of Asura', 44 | 3765, 4971), 45 | '10': Volume('10 - Hidden Dragon Martial Sect', 46 | 4600, 4601) 47 | # As of Apr 2021, this novel has 4790+ chapters and isn't finished 48 | } 49 | 50 | origin = 'http://www.wuxiaworld.com/novel/martial-god-asura/' 51 | author = 'Kindhearted Bee (善良的蜜蜂 / Shan Liang de Mi Feng)' 52 | cover_file = 'Covers/mga.jpg' 53 | title = 'Martial God Asura - Vol' 54 | 55 | synopsis_text = """ 56 | Regarding potential—even if you are not considered a genius, you can still 57 | learn Mysterious Techniques and martial skills. Anyone can be enlightened 58 | without a master.
59 | 60 |Regarding strength—despite having a myriad of artifacts, you may not defeat 61 | my army of World Spirits.
62 | 63 |Who am I? All of the world’s living perceives me as Asura, but I was 64 | ignorant to such a thing. I thus ascend to be the Martial God as Asura. 65 | """ 66 | 67 | 68 | def genlist(start, end): 69 | global origin 70 | chapterlist = [] 71 | for i in range(start, end+1): 72 | if i == 1632: 73 | # Author misnumbered chapter 1633 as 1632 and continued from there, 74 | # causing this number to be duplicated 75 | url = origin + 'mga-chapter-1632-01' 76 | chapterlist.append(url) 77 | url = origin + 'mga-chapter-1632-02' 78 | chapterlist.append(url) 79 | # elif i == 4452: 80 | # # Author misnumbered chapter 4452 as 4552 81 | # url = origin + 'mga-chapter-4552' 82 | # chapterlist.append(url) 83 | else: 84 | url = origin + 'mga-chapter-' + str(i) 85 | chapterlist.append(url) 86 | return chapterlist 87 | 88 | 89 | def clean(content): 90 | return content 91 | -------------------------------------------------------------------------------- /Novels/Complete/ss.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 30/01/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | 28 | Volume = common.Volume 29 | 30 | volumes = {'1': Volume('1 - Awakening in the night', 1, 20), 31 | '2': Volume('2 - Fighter', 21, 40), 32 | '3': Volume('3 - Nine stage Thunder Blade', 41, 60), 33 | '4': Volume('4 - Astronomical bounty', 61, 85), 34 | '5': Volume('5 - Wargod Luo Feng', 86, 100), 35 | '6': Volume('6 - The fifty thousand year old corpse', 101, 173), 36 | '7': Volume('7 - Rebirth', 174, 223), 37 | '8': Volume('8 - Universe adventure', 224, 259), 38 | '9': Volume('9', 260, 314), 39 | '10': Volume('10', 315, 364), 40 | '11': Volume('11', 365, 439), 41 | '12': Volume('12', 440, 478), 42 | '13': Volume('13', 479, 541), 43 | '14': Volume('14', 542, 606), 44 | '15': Volume('15', 607, 668), 45 | '16': Volume('16', 669, 714), 46 | '17': Volume('17', 715, 753), 47 | '18': Volume('18', 754, 792), 48 | '19': Volume('19', 793, 861), 49 | '20': Volume('20', 862, 888), 50 | '21': Volume('21', 889, 943), 51 | '22': Volume('22', 944, 994), 52 | '23': Volume('23', 995, 1027), 53 | '24': Volume('24', 1028, 1092), 54 | '25': Volume('25', 1093, 1129), 55 | '26': Volume('26', 1130, 1158), 56 | '27': Volume('27', 1159, 1213), 57 | '28': Volume('28', 1214, 1259), 58 | '29': Volume('29', 1260, 1313), 59 | '30': Volume('30', 1314, 1338), 60 | '31': Volume('31', 1339, 1400), 61 | '32': Volume('32', 1401, 1486), 62 | } 63 | 64 | origin = 'http://www.wuxiaworld.co/Swallowed-Star/' 65 | author = 'I Eat Tomatoes (我吃西红柿)' 66 | cover_file = 'Covers/swallowed-star.jpg' 67 | title = 'Swallowed Star - Vol' 68 | 69 | synopsis_text = """ 70 | Year 2056, in a city in the Yuan Jiang Su Jin area. On top of a ruined, 71 | shattered six story residential apartment sits a teenager wearing a combat 72 | vest, militaristic trousers, and alloyed battle boots. On his back is a 73 | hexagonal shield and equipped is a blood-shadow battle knife. He sits there 74 | silently on the edge of the roof. At this time, the sparkling sky was shining 75 | and there was a refreshing breath within the air that blew towards him. 76 | However, there was only silence within the ruined, deserted city, with an 77 | occasional howl that makes your heart skip a beat. 78 | """ 79 | 80 | 81 | def genlist(start, end): 82 | global origin 83 | list_page = common.get_html(origin) 84 | chapterlist = [] 85 | for i in range(start, end+1): 86 | text = '^' + str(i) + ' .*' 87 | link = list_page.find('a', text=re.compile(text)) 88 | url = origin + link['href'].split("/")[-1] 89 | chapterlist.append(url) 90 | return chapterlist 91 | 92 | 93 | def clean(content): 94 | return content 95 | -------------------------------------------------------------------------------- /Novels/zhan-long.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | 28 | Volume = common.Volume 29 | 30 | volumes = {'1': Volume('1 - Starting from scratch', 31 | 1, 248), 32 | '2': Volume('2 - Rise of heroes', 33 | 249, 500), 34 | '3': Volume('3 - The Grandmaster', 35 | 501, 748), 36 | '4': Volume('4 - The chase to the top', 37 | 749, 1000), 38 | '5': Volume('5', 39 | 1001, 1007), 40 | '6': Volume('6 - END', 41 | 1251, 1251), 42 | # This novel ends with chapter 1379 43 | } 44 | 45 | origin = 'http://www.wuxiaworld.co/Zhan-Long/' 46 | author = 'Shi Luo Ye' 47 | cover_file = 'Covers/zhan-long.jpg' 48 | title = 'Zhan Long - Vol' 49 | 50 | synopsis_text = """ 51 | Li Xiao Yao left S.W.A.T to become an ordinary security guard. While working, 52 | he happened to enter the VIP room and found Lin Wang Er still in the middle of 53 | changing. As revenge, she took him on a ride and kicked him out of the car.
54 | 55 |After hours of walking, Li Xiao Yao finally managed to get back home just to 56 | be kicked out of the house. He then got an offer from his previous supervisor 57 | to become the bodyguard of the Tian Xi group CEO’s daughter both in game and in 58 | reality. But unknown to Li Xiao Yao the girl was actually… 59 | """ 60 | 61 | 62 | def genlist(start, end): 63 | global origin 64 | list_page = common.get_html(origin) 65 | chapterlist = [] 66 | for i in range(start, end+1): 67 | # print(i) 68 | text = '^Chapter %s .*' % str(i) 69 | if i in [30, 236, 237, 406, 408, 548, 749, 828]: 70 | text = '^Chapter %s' % str(i) 71 | elif i == 336: 72 | text = '^Chapter 336 – You Lump of Meat!' 73 | elif i == 337: 74 | text = '^Chapter 336 – The Tyrannical Ye Lai' 75 | elif i == 490: 76 | text = '^Chapter 490 – The Endless Chase' 77 | elif i == 590: 78 | text = '^Chapter 490 – The Red Dragon Queen' 79 | elif i == 830: 80 | text = '^Chapter 830 Rotten and Rusty Army Part 1 ?' 81 | link = list_page.find('a', text=re.compile(text)) 82 | url = origin + link['href'].split("/")[-1] 83 | chapterlist.append(url) 84 | text = '^Chapter 830 – Rotten and Rusty Army Part 2 ?' 85 | elif i in [857, 861, 862, 863, 864, 865] or i >= 867: 86 | text = '^Chapter %s.*' % str(i) 87 | elif i == 51 or i >= 841: 88 | text = '^Chapter %s-.*' % str(i) 89 | elif i == 839: 90 | text = '^hapter 839 – The Flying Slash Part 1' 91 | link = list_page.find('a', text=re.compile(text)) 92 | url = origin + link['href'].split("/")[-1] 93 | chapterlist.append(url) 94 | return chapterlist 95 | 96 | 97 | def clean(content): 98 | return content 99 | -------------------------------------------------------------------------------- /Novels/Complete/gdw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 25/03/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 113), 30 | '2': Volume('2', 114, 339), 31 | '3': Volume('3', 340, 409), 32 | '4': Volume('4', 410, 511), 33 | '5': Volume('5', 512, 580), 34 | '6': Volume('6', 581, 735), 35 | '7': Volume('7', 736, 1026), 36 | } 37 | 38 | origin = 'http://www.wuxiaworld.co/God-and-Devil-World/' 39 | author = 'Zi Chan Bao Zeng (资产暴增)' 40 | cover_file = 'Covers/godanddevilworld.jpg' 41 | title = 'God and Devil world - Vol' 42 | 43 | synopsis_text = """ 44 | In less than an instant the world as we knew it was at its end.
45 | 46 |That’s right. The Apocalypse. In a single blink Zombies appeared and mutated 47 | monsters began to rampage all throughout the world. Now it was the human 48 | species turn to fight for survival and planetary dominance!
49 | 50 |On the same day that the world descends into chaos we meet Yue Zhong. 51 | Initially only hoping to get to his friends and escape to a refugee camp our 52 | protagonist sets out, inadvertently building a team along the way. After a 53 | series of fortuitous events and a few serious hunches our hero decides it’s 54 | time to do more than just survive!
55 | 56 |Yue Zhong begins to form the foundations of an enormous survival plan… 57 | before he suddenly discovers that he has only gotten over the first hurdle…. 58 | Unbeknownst to Yue Zhong and company, the world outside of China is mostly a 59 | wasteland! Country sized swathes of nuclear radiation and an extreme shortage 60 | of supplies in the world after the nuclear explosions was quickly becoming the 61 | “norm”. Mutants, Evolved animals and what’s worse, intelligent out of control 62 | dinosaurs had quickly appeared and claimed their own sections of the planet. 63 | There were several innately powerful Evolved races which appeared that were 64 | more than 10 times stronger than humans, nearly all of them possessing bodies 65 | impenetrable by normal bullets. The fabled orcs’ were another of these Evolved 66 | races, the leader of which had in fact enslaved many of the remaining human 67 | beings.
68 | 69 |Unceremoniously exposed to such a cold and heartless new world, Yue Zhong is 70 | faced with a choice: Find a deep dark hole and hope it goes back to “normal”? 71 | Or overcome all obstacles and struggle towards Evolution!!! 72 | """ 73 | 74 | 75 | def genlist(start, end): 76 | global origin 77 | list_page = common.get_html(origin) 78 | chapterlist = [] 79 | for i in range(start, end+1): 80 | text = '^' + str(i) + ' .*' 81 | link = list_page.find('a', text=re.compile(text)) 82 | url = origin + link['href'].split("/")[-1] 83 | chapterlist.append(url) 84 | return chapterlist 85 | 86 | 87 | def clean(content): 88 | # credline = re.compile(r'Translator:.*Editor:.*') 89 | # for i in content.find_all(text=credline): 90 | # i.replaceWith('') 91 | return content 92 | -------------------------------------------------------------------------------- /Novels/Complete/usaw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1 - Rise of the Cloud', 0, 90), 30 | '2': Volume('2 - Wandering the Beiyan province', 91, 180), 31 | '3': Volume('3 - The Crafting School', 181, 361), 32 | '4': Volume('4 - Soulbeast forest', 362, 510), 33 | '5': Volume('5 - Turmoil in the Capital', 511, 700), 34 | '6': Volume('6 - Pill Royale', 701, 840), 35 | '7': Volume('7 - Shocking the continent', 841, 1000), 36 | '8': Volume('8 - A midlife reincarnation', 1001, 1050), 37 | '9': Volume('9 - The return of the mighty', 1051, 1160), 38 | '10': Volume('10 - Times of Turbulence', 1161, 1290), 39 | '11': Volume('11 - The Supreme Saints inheritance', 1291, 1356) 40 | # This novel ends with chapter 1356 41 | } 42 | 43 | origin = 'http://www.wuxiaworld.co/Upgrade-Specialist-in-Another-World/' 44 | author = 'Endless Sea Of Clouds (茫茫云海)' 45 | cover_file = 'Covers/usaw.jpg' 46 | title = 'Upgrade Specialist in Another World - Book ' 47 | 48 | synopsis_text = """Just as a gamer found an overpowered skill book called ‘Item 49 | Upgrade’ in the hottest virtual reality role-playing game on Earth, something 50 | happened to the game’s system, causing his soul to leave his body and go to 51 | another dimension. Common sense dictates that he would be born anew then become 52 | the greatest overlord of this world by making use of his advanced knowledge. 53 | Not in this case! He was already dead. Only some fragments of his soul and that 54 | skill book managed to get into that dimension and merge with an ordinary common 55 | youngster called Bai Yunfei.
56 | 57 |This was the enormous Tianhun continent, where humans could be said to have 58 | no limits. There was a group of humans here who could cultivate the power of 59 | their own souls then control their bodies, the natural elements and even other 60 | people’s souls with that power! These special beings were called — soul 61 | cultivators. Come witness how the several fragments of the dead 62 | inter-dimensional traveler’s soul and that skill book, which was not governed 63 | by the laws of this plane, were going to help Bai Yunfei become a legendary 64 | soul cultivator and craftsman! 65 | """ 66 | 67 | 68 | def genlist(start, end): 69 | global origin 70 | list_page = common.get_html(origin) 71 | chapterlist = [] 72 | currentvol = '' 73 | for key, value in volumes.items(): 74 | if value.first is start: 75 | currentvol = key 76 | for i in range(start, end+1): 77 | if i == 0: 78 | text = "USAW Prologue" 79 | elif i == 554: 80 | text = "Chaper %s:.*" % str(i) 81 | else: 82 | text = "Chapter %s:.*" % str(i) 83 | link = list_page.find('a', text=re.compile(text)) 84 | url = "%s%s" % (origin, link['href'].split("/")[-1]) 85 | chapterlist.append(url) 86 | return chapterlist 87 | 88 | 89 | def clean(content): 90 | return content 91 | -------------------------------------------------------------------------------- /Novels/overgeared.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 01/11/20 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1558), 45 | # 46 | '17': Volume('17', 1601, 1601), 47 | '18': Volume('18', 1701, 1701), 48 | '19': Volume('19', 1801, 1801), 49 | '20': Volume('20', 1901, 1901), 50 | } 51 | 52 | origin = 'http://www.wuxiaworld.com/novel/overgeared' 53 | author = 'Park Saenal' 54 | cover_file = 'Covers/Overgeared.jpg' 55 | title = 'Overgeared - Vol' 56 | 57 | synopsis_text = """ 58 | As Shin Youngwoo had an unfortunate life and is now stuck carrying bricks on 59 | construction sites. He even had to do labor in the VR game, Satisfy!
60 | 61 |However, luck would soon enter his hopeless life. His character, ‘Grid’, 62 | would discover the Northern End Cave for a quest, and in that place, he would 63 | find ‘Pagma’s Rare Book’ and become a legendary class player… 64 | """ 65 | 66 | 67 | def genlist(start, end): 68 | global origin 69 | list_page = common.get_html(origin) 70 | chapterlist = [] 71 | for i in range(start, end+1): 72 | # print(i) 73 | # text = '^Chapter %s$' % str(i) 74 | # if i in range(127, 137): 75 | # text = '^Chapter %s' % str(i) 76 | # elif i in [149, 861, 1044, 1212]: 77 | # text = '^Chapter %s-.*' % str(i) 78 | # elif i == 283: 79 | # text = '^Chapter 284 – Special Requests' 80 | # elif i == 284: 81 | # text = '^Chapter 284 – Seeing West Wonder King' 82 | # elif i == 311: 83 | # text = '^Chapter 312 – Playing the Role of A Silkpants' 84 | # elif i == 312: 85 | # text = '^Chapter 312 – Keeping Up Appearances' 86 | # elif i == 1350: 87 | # continue 88 | # link = list_page.find('a', text=re.compile(text)) 89 | # url = origin + link['href'].split("/")[-1] 90 | 91 | url = origin + '/og-chapter-' + str(i) 92 | 93 | chapterlist.append(url) 94 | # print(chapterlist) 95 | chapterlist = list(dict.fromkeys(chapterlist)) 96 | return chapterlist 97 | 98 | 99 | def clean(content): 100 | # credline = re.compile(r'Translator:.*Editor:.*') 101 | # for i in content.find_all(text=credline): 102 | # i.replaceWith('') 103 | return content 104 | -------------------------------------------------------------------------------- /Novels/tle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 20/10/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | 28 | Volume = common.Volume 29 | 30 | volumes = {'1': Volume('1', 1, 100), 31 | '2': Volume('2', 101, 200), 32 | '3': Volume('3', 201, 300), 33 | '4': Volume('4', 301, 400), 34 | '5': Volume('5', 401, 500), 35 | '6': Volume('6', 501, 600), 36 | '7': Volume('7', 601, 700), 37 | '8': Volume('8', 701, 800), 38 | '9': Volume('9', 801, 900), 39 | '10': Volume('10', 901, 1000), 40 | '11': Volume('11', 1001, 1100), 41 | '12': Volume('12', 1101, 1200), 42 | '13': Volume('13', 1201, 1300), 43 | '14': Volume('14', 1301, 1400), 44 | '15': Volume('15', 1401, 1500), 45 | '16': Volume('16', 1501, 1600), 46 | '17': Volume('17', 1601, 1700), 47 | '18': Volume('18', 1701, 1727), 48 | # 49 | '19': Volume('19', 1801, 1801), 50 | '20': Volume('20', 1901, 1901), 51 | '21': Volume('21', 2001, 2001), 52 | '22': Volume('22', 2101, 2101), 53 | '23': Volume('23', 2201, 2201), 54 | '24': Volume('24', 2301, 2301), 55 | '25': Volume('25', 2401, 2401), 56 | '26': Volume('26', 2501, 2501), 57 | '27': Volume('27', 2601, 2601), 58 | '28': Volume('28', 2701, 2701), 59 | '29': Volume('29', 2801, 2801), 60 | # As of Apr 2020, there are 3078+ chapters in the original novel 61 | } 62 | 63 | origin = 'http://www.wuxiaworld.co/The-Lord-is-Empire/' 64 | author = ' (神天衣)' 65 | cover_file = 'Covers/the-lords-empire.jpg' 66 | title = "The Lord's Empire - Vol" 67 | 68 | synopsis_text = """ 69 | "Ding! Soulbinding has been successfully completed; you will now head to the 70 | Heaven Awaken World.” After hearing this, Zhao Fu’s vision darkened as he fell 71 | to the ground.
72 | 73 |With bleak prospects in the real world, Zhao Fu's life is turned around when 74 | countless crystals fell from the sky one night, which people could use to enter 75 | an alternate, game-like world. After obtaining an ancient Chinese empire's 76 | legacy, Zhao Fu uses his intellect and resourcefulness to develop his own 77 | empire from a tiny village. However, with enemies both in the real world and in 78 | the Heaven Awaken World, he must make brilliant decisions and use creative 79 | schemes to survive.
80 | 81 |If you enjoy kingdom-building, game-like alternate worlds, incorporation of 82 | ancient history (though some is romanticised), and strategy, you'll be sure to 83 | love The Lord's Empire! 84 | """ 85 | 86 | 87 | def genlist(start, end): 88 | global origin 89 | list_page = common.get_html(origin) 90 | chapterlist = [] 91 | for i in range(start, end+1): 92 | # print(i) 93 | text = '^' + str(i) + ' .*' 94 | link = list_page.find('a', text=re.compile(text)) 95 | url = origin + link['href'].split("/")[-1] 96 | chapterlist.append(url) 97 | return chapterlist 98 | 99 | 100 | def clean(content): 101 | return content 102 | -------------------------------------------------------------------------------- /Novels/chaotic.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1', 1, 50), 30 | '2': Volume('2', 51, 100), 31 | '3': Volume('3', 101, 150), 32 | '4': Volume('4', 151, 200), 33 | '5': Volume('5', 201, 250), 34 | '6': Volume('6', 251, 289), 35 | # 36 | '7..': Volume('5', 301, 349), 37 | '8..': Volume('5', 351, 400), 38 | '9..': Volume('5', 401, 449), 39 | '10.': Volume('5', 450, 500), 40 | '11.': Volume('5', 501, 549), 41 | '12.': Volume('5', 551, 600), 42 | '13.': Volume('5', 601, 649), 43 | '14.': Volume('5', 651, 700), 44 | '15.': Volume('5', 701, 749), 45 | '16.': Volume('5', 751, 800), 46 | '17.': Volume('5', 801, 849), 47 | '18.': Volume('5', 851, 900), 48 | '19.': Volume('5 - END', 901, 954), 49 | } 50 | 51 | origin = 'http://www.wuxiaworld.co/Chaotic-Lightning-Cultivation/' 52 | author = 'Xie Zi Ban (写字板)' 53 | cover_file = 'Covers/chaotic-lightning-cultivation.jpg' 54 | title = 'Chaotic Lightning Cultivation - Vol' 55 | 56 | synopsis_text = """ 57 | His parents were the geniuses of the sect. But they were apparently killed 58 | while on a mission when he was barely 6. As he apparently did not excel in 59 | any of the 5 elements, in fact, all 5 elements are in balance in his body. 60 | Thus, our fatty is deemed to be trash and does not deserve the respect his 61 | parents had.
62 | 63 |He is allowed to have one task, to collect garbage of the sect until he
64 | reaches the initial test-age where he has to proof to be worthy to stay in
65 | the sect.
66 | Our fatty has no choice but to cultivate the only heritage his parents gave
67 | him. A mysterious black pearl.
Unfortunately for him, this pearl seems to be only useful for… collecting 70 | garbage…
71 | 72 |Original Synopsis:
73 | 74 |A Little Fatty who was constantly bullied in his sect, by relying on the 75 | Magical Artifact his parents left behind, cultivated the peerless, primally 76 | chaotic Five Elements Lightning technique. Using this, he slowly rose and 77 | dominated the continents. 10th Step Water Divine Lighting, 3rd Step Fire 78 | Divine Lightning, 5th Step Earth Divine Lighting, 7th Step Metal Divine 79 | Lighting, Lesser 5 Element Soul Divine Lighting, Greater 5 Element 80 | Destruction Divine Lighting, Dark Purple Divine Lighting, Pure Divine 81 | Lighting, Clear Sky Divine Lighting, Righteous Taichi Divine Lightning.
82 | 83 |A monk once said, “One who has dissatisfactions should get struck by all 5 84 | bolts of lightning” 85 | """ 86 | 87 | 88 | def genlist(start, end): 89 | global origin 90 | list_page = common.get_html(origin) 91 | chapterlist = [] 92 | for i in range(start, end+1): 93 | text = "Chapter %s: " % str(i) 94 | link = list_page.find('a', text=re.compile(text)) 95 | url = "%s%s" % (origin, link['href']) 96 | chapterlist.append(url) 97 | return chapterlist 98 | 99 | 100 | def clean(content): 101 | return content 102 | -------------------------------------------------------------------------------- /Novels/htrep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 24/01/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1', 30 | 100, 113), 31 | '2': Volume('2', 32 | 201, 212), 33 | '3': Volume('3', 34 | 301, 313), 35 | '4': Volume('4', 36 | 401, 412), 37 | '5': Volume('5', 38 | 501, 512), 39 | '6': Volume('6', 40 | 601, 613), 41 | '7': Volume('7 - Omake1', 42 | 701, 710), 43 | '8': Volume('8 - Omake2', 44 | 801, 810), 45 | } 46 | 47 | origin = 'http://stabbingwithasyringe.home.blog/translations/harem-tales' + \ 48 | '-of-reincarnated-elf-prince/' 49 | author = 'Warui Baketsu (わるいバケツ)' 50 | cover_file = 'Covers/htrep.jpg' 51 | title = 'Harem tales of a reincarnated elf prince - Vol' 52 | 53 | synopsis_text = """ 54 | I was a good looking prince when I was reborn, and because I could do 55 | indecent things as much as I like, I decided to make a harem while traveling 56 | with a beautiful female elf
57 | 58 |Formerly an otaku, the hero who was just reincarnated became a handsome elf 59 | prince of another world.
60 | 61 |In his previous life he was just a plain-faced man, so in this world he uses 62 | his high position as a prince to his advantage and keep holding beautiful women 63 | in his arms, every day in his life.
64 | 65 |With his status as a prince and a handsome face, together with the high 66 | abilities of the elves……he will thoroughly enjoy the life that he hasn’t done 67 | in his previous world! 68 | """ 69 | 70 | 71 | def genlist(start, end): 72 | global origin 73 | chapterlist = [] 74 | for i in range(start, end+1): 75 | if i == 100: 76 | url = origin + 'harem-tales-of-a-reincarnated-elf-prince-prologue-1/' 77 | chapterlist.append(url) 78 | url = origin + 'reincarnated-elf-prince-prologue-2-2/' 79 | chapterlist.append(url) 80 | elif i in range(100, 105+1): 81 | url = origin + "reincarnated-elf-prince-chapter-" + \ 82 | str(i)[1:].lstrip('0') + "/" 83 | chapterlist.append(url) 84 | elif i == 613: 85 | url = origin + "translations/tower-dungeon-management/" + \ 86 | "mage-tower-management-epilogue/" 87 | chapterlist.append(url) 88 | elif i in range(700, 711): 89 | url = origin + "reincarnated-elf-prince-extra-volume-1-chapter-" \ 90 | + str(i)[1:].lstrip('0') + "/" 91 | chapterlist.append(url) 92 | elif i in range(800, 811): 93 | url = origin + "reincarnated-elf-prince-extra-volume-2-chapter-" \ 94 | + str(i)[1:].lstrip('0') + "/" 95 | chapterlist.append(url) 96 | else: 97 | url = origin + "reincarnated-elf-prince-volume-" + str(i)[0] + \ 98 | "-chapter-" + str(i)[1:].lstrip('0') + "/" 99 | chapterlist.append(url) 100 | return chapterlist 101 | 102 | 103 | def clean(content): 104 | for i in content.find_all('script'): 105 | i.decompose() 106 | return content 107 | -------------------------------------------------------------------------------- /Novels/mp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2020 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 21/02/2020 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1800), 47 | '19': Volume('19', 1801, 1900), 48 | '20': Volume('20', 1901, 2000), 49 | '21': Volume('21', 2001, 2100), 50 | '22': Volume('22', 2101, 2200), 51 | '23': Volume('23', 2201, 2300), 52 | '24': Volume('24', 2301, 2368), 53 | # 54 | '25': Volume('25', 2401, 2401), 55 | '26': Volume('26', 2501, 2501), 56 | '27': Volume('27', 2601, 2601), 57 | '28': Volume('28', 2701, 2701), 58 | '29': Volume('29', 2801, 2801), 59 | # As of May 2020, there are 5800+ chapters in the original novel. 60 | } 61 | 62 | origin = 'http://www.wuxiaworld.co/Martial-Peak/' 63 | author = 'MoMo (莫默)' 64 | cover_file = 'Covers/martial-peak.jpg' 65 | title = 'Martial Peak - Vol' 66 | 67 | synopsis_text = """ 68 | The journey to the martial peak is a lonely, solitary and long one. In the face 69 | of adversity, you must survive and remain unyielding. Only then can you break 70 | through and continue on your journey to become the strongest. High Heaven 71 | Pavilion tests its disciples in the harshest ways to prepare them for this 72 | journey. One day the lowly sweeper Kai Yang managed to obtain a black book, 73 | setting him on the road to the peak of the martials world. 74 | """ 75 | 76 | 77 | def genlist(start, end): 78 | global origin 79 | list_page = common.get_html(origin) 80 | chapterlist = [] 81 | for i in range(start, end+1): 82 | # print(i) 83 | if i in list(range(1, 51)) + list(range(52, 505)) + \ 84 | list(range(506, 627)): 85 | text = '^Chapter %s – .*' % str(i) 86 | elif i in [51]: 87 | text = '^Chapter %s - .*' % str(i) 88 | elif i in [505, 981]: 89 | text = '^Chapter %s( |,).*' % str(i) 90 | link = list_page.find('a', text=re.compile(text)) 91 | url = origin + link['href'].split("/")[-1] 92 | chapterlist.append(url) 93 | text = '^Chapter %s.5( |,).*' % str(i) 94 | elif i == 968: 95 | text = '^Chapter %s. .*' % str(i) 96 | elif i in [1615, 2048, 2288]: 97 | continue 98 | else: 99 | text = '^Chapter %s, .*' % str(i) 100 | link = list_page.find('a', text=re.compile(text)) 101 | url = origin + link['href'].split("/")[-1] 102 | chapterlist.append(url) 103 | return chapterlist 104 | 105 | 106 | def clean(content): 107 | return content 108 | -------------------------------------------------------------------------------- /Novels/vm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 04/11/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1800), 47 | '19': Volume('19', 1801, 1900), 48 | '20': Volume('20', 1901, 2000), 49 | '21': Volume('21', 2001, 2100), 50 | '22': Volume('22', 2101, 2200), 51 | '23': Volume('23', 2201, 2271), 52 | # 53 | '24': Volume('24', 2301, 2301), 54 | '25': Volume('25', 2401, 2401), 55 | '26': Volume('26', 2501, 2501), 56 | '27': Volume('27', 2601, 2601), 57 | '28': Volume('28', 2701, 2701), 58 | '29': Volume('29', 2801, 2801), 59 | '30': Volume('30', 2901, 2901), 60 | '31': Volume('31', 3001, 3001), 61 | '32': Volume('32', 3101, 3101), 62 | # This novel ends in chapter 3210 63 | } 64 | 65 | origin = 'http://www.wuxiaworld.co/Versatile-Mage/' 66 | author = 'Chaos (乱)' 67 | cover_file = 'Covers/versatile-mage.jpg' 68 | title = 'Versatile Mage - Vol' 69 | 70 | synopsis_text = """ 71 | He woke up in a familiar world that had vastly changed.
72 | 73 |His familiar school had become a mystical school that teaches magic, 74 | encouraging everyone to become a mighty magician.
75 | 76 |Outside the city, many wandering magical beasts and monsters attacked and 77 | preyed on humans.
78 | 79 |His world of advanced science changed into one that praised magic. Despite 80 | this, his ambition in life, and his social status remained the same; one of the 81 | dregs of the society with a struggling father and a disabled step sister that 82 | couldn’t walk.
83 | 84 |However, Mo Fan found that when most people could only practice a single 85 | major element of magic, he was a Versatile Mage! 86 | """ 87 | 88 | 89 | def genlist(start, end): 90 | global origin 91 | list_page = common.get_html(origin) 92 | chapterlist = [] 93 | for i in range(start, end+1): 94 | if i in [1658, 1659, 1660, 1662, 1663, 1664,]: 95 | continue 96 | if i < 256: 97 | text = "Chapter %s .*" % str(i) 98 | if i == 61: 99 | text = "Chapter %s.*" % str(i) 100 | if i in [124, 135, 251]: 101 | text = "Chapter 0%s .*" % str(i) 102 | else: 103 | text = "^%s .*" % str(i) 104 | link = list_page.find('a', text=re.compile(text)) 105 | url = "%s%s" % (origin, link['href'].split("/")[-1]) 106 | chapterlist.append(url) 107 | return chapterlist 108 | 109 | 110 | def clean(content): 111 | return content 112 | -------------------------------------------------------------------------------- /novel2epub.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (C) 2016 GatoLoko 3 | 4 | """ 5 | Crated on Sat Nov 12 16:41:00 2016 6 | @author: GatoLoko 7 | """ 8 | 9 | import argparse 10 | import os 11 | import sys 12 | 13 | import psutil 14 | 15 | PROG_DIR = os.path.dirname(os.path.realpath(__file__)) 16 | sys.path.append(os.path.join(PROG_DIR, "libs")) 17 | sys.path.append(os.path.join(PROG_DIR, "Novels")) 18 | sys.path.append(os.path.join(PROG_DIR, os.path.join("Novels", "Complete"))) 19 | try: 20 | import common 21 | from gs_epub import MyBook 22 | except ImportError: 23 | raise 24 | 25 | 26 | def arguments(): 27 | """ Manage all supported arguments """ 28 | parser = argparse.ArgumentParser( 29 | description="Download web stories and stores them as epub.", 30 | epilog="This script doesn't support actualizing an existing epub" + 31 | " with new chapters, so it regenerates them from scratch.", 32 | argument_default=argparse.SUPPRESS) 33 | parser.add_argument('novel', metavar='novel', type=str, 34 | help='Which novel you want to get') 35 | parser.add_argument('volume', metavar='volume', type=int, 36 | help="Which volume to get") 37 | parser.add_argument('-d', '--debug', action='store_true', default=False, 38 | help='Print debug messages to stdout') 39 | parser.add_argument('labels', metavar='labels', nargs='*', 40 | help='Labels to add as metadata to the epub') 41 | parsed_args = parser.parse_args() 42 | 43 | if parsed_args.debug: 44 | print(parsed_args) 45 | memory = psutil.Process(os.getpid()).memory_info()[0] / float(2 ** 20) 46 | print("Used memory: %s MB" % round(memory, 1)) 47 | 48 | return parsed_args 49 | 50 | 51 | if __name__ == "__main__": 52 | 53 | args = arguments() 54 | 55 | try: 56 | novel = __import__(args.novel) 57 | common.novel_module = args.novel 58 | print("Loaded %s module" % args.novel) 59 | except ImportError: 60 | print("Unsuported novel") 61 | raise 62 | 63 | volume = novel.volumes[str(args.volume)] 64 | print("Volume start: %s" % volume.first) 65 | print("Volume end: %s" % volume.last) 66 | chapterlist = novel.genlist(volume.first, volume.last) 67 | if args.volume < 10: 68 | FILL = '0' 69 | else: 70 | FILL = '' 71 | title = novel.title + FILL + volume.title 72 | # Remove from the file name those characters that FAT does NOT allow, so we 73 | # can transfer the file to a phone or tablet sdcard: \/:*?"<>| 74 | for i in ['\\', '/', ':', '*', '?', '"', '<', '>', '|']: 75 | if i in title: 76 | title = title.replace(i, '') 77 | filename = title + ".epub" 78 | print("Title: " + title) 79 | print("Chapters: " + str(len(chapterlist))) 80 | print("Filename: " + filename) 81 | 82 | identifier = "novel2epub/%s/%s/%s" % (args.novel, novel.title, volume.last) 83 | LANGUAGE = 'en' 84 | 85 | book = MyBook(identifier, title, LANGUAGE, 'novel2epub') 86 | 87 | if hasattr(args, 'labels'): 88 | book.add_labels(args.labels) 89 | 90 | # Add a cover if it's available 91 | book.add_cover(os.path.join(PROG_DIR, novel.cover_file)) 92 | 93 | for i in chapterlist: 94 | if args.debug: 95 | print(i) 96 | ch_title, ch_file, ch_text = common.get_chapter(i) 97 | book.add_chapter(ch_title, ch_file, LANGUAGE, ch_text) 98 | 99 | # Define CSS style 100 | with open(os.path.join(PROG_DIR, "CSS/nav.css")) as style_nav: 101 | book.add_nav_style(style_nav.read()) 102 | with open(os.path.join(PROG_DIR, "CSS/body.css")) as style_body: 103 | book.add_body_style(style_body.read()) 104 | 105 | # Introduction 106 | book.add_intro(novel.author, novel.origin, novel.synopsis_text, 107 | os.path.join(PROG_DIR, 'HTML/intro.xhtml')) 108 | 109 | # Define Table of Contents, NCX, Nav and book spine 110 | book.finalize() 111 | 112 | if args.debug: 113 | print(args) 114 | mem = psutil.Process(os.getpid()).memory_info()[0] / float(2 ** 20) 115 | print("Used memory: %s MB" % round(mem, 1)) 116 | 117 | book.write(filename) 118 | -------------------------------------------------------------------------------- /Novels/mwiabc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1397), 43 | # 44 | '15': Volume('15', 1401, 1401), 45 | '16': Volume('16', 1501, 1501), 46 | '17': Volume('17', 1601, 1601), 47 | # This novel ends with chapter 1664 48 | } 49 | 50 | origin = 'http://www.wuxiaworld.co/My-Wife-is-a-Beautiful-CEO/' 51 | author = 'Cabbage Flatbread (霉干菜烧饼)' 52 | cover_file = 'Covers/My-Wife-is-a-Beautiful-CEO.jpg' 53 | title = 'My wife is a beautiful CEO - Vol' 54 | 55 | synopsis_text = """ 56 | This story takes place in Modern China. However, no matter how much things 57 | change, in the depths of society, a secret world of syndicates and hidden 58 | factions exist.
59 | 60 |Yang Chen, a graduate from Harvard who is fluent in English, French, 61 | Italian, and German to list a few. He is also capable of fighting and a number 62 | of practical skills. Yet he chose to go on the streets to sell fried mutton 63 | skewers for a living.
64 | 65 |Lin Ruoxi is the CEO of a multibillion-dollar company—Yu Lei International. 66 | This company is one of the leaders in the cosmetic and fashion industry. 67 | Despite being only 20 years old, her ice-cold demeanor and beauty are 68 | well-known and unrivaled in Zhonghai City.
69 | 70 |Due to a wild night consisting of a lot of liquor, fate has brought them 71 | together to become husband and wife.
72 | 73 |And with that, the story begins! 74 | """ 75 | 76 | # Regex's for cleanup 77 | volareline = re.compile(r'.*(volaretranslations)|(volarenovel).*') 78 | 79 | 80 | def genlist(start, end): 81 | global origin 82 | list_page = common.get_html(origin) 83 | chapterlist = [] 84 | for i in range(start, end+1): 85 | if i in [1177, 1179]: 86 | continue 87 | # print(i) 88 | text = '^Chapter %s: .*' % str(i) 89 | if i == 123: 90 | text = '^Chapter %s-1' % str(i) 91 | link = list_page.find('a', text=re.compile(text)) 92 | url = origin + link['href'].split("/")[-1] 93 | chapterlist.append(url) 94 | text = '^Chapter %s-2:' % str(i) 95 | elif i in range(124, 229+1) or i in [233, 253]: 96 | text = '^Chapter %s-1:.*' % str(i) 97 | link = list_page.find('a', text=re.compile(text)) 98 | url = origin + link['href'].split("/")[-1] 99 | chapterlist.append(url) 100 | text = '^Chapter %s-2:.*' % str(i) 101 | elif i == 250 or i >= 563: 102 | text = '^Chapter %s' % str(i) 103 | link = list_page.find('a', text=re.compile(text)) 104 | url = origin + link['href'].split("/")[-1] 105 | chapterlist.append(url) 106 | return chapterlist 107 | 108 | 109 | def clean(content): 110 | for i in content.find_all(text=volareline): 111 | i.replaceWith('') 112 | return content 113 | -------------------------------------------------------------------------------- /Novels/csg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 04/11/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1800), 47 | '19': Volume('19', 1801, 1900), 48 | '20': Volume('20', 1901, 2000), 49 | '21': Volume('21', 2001, 2100), 50 | '22': Volume('22', 2101, 2200), 51 | '23': Volume('23', 2201, 2300), 52 | '24': Volume('24', 2301, 2400), 53 | '25': Volume('25', 2401, 2500), 54 | '26': Volume('26', 2501, 2600), 55 | '27': Volume('27', 2601, 2700), 56 | '28': Volume('28', 2701, 2800), 57 | '29': Volume('29', 2801, 2900), 58 | '30': Volume('30', 2901, 3000), 59 | '31': Volume('31', 3001, 3051), 60 | # As of May 2021, there are 2978+ chapters in the original novel. 61 | } 62 | 63 | origin = 'http://www.wuxiaworld.co/Chaotic-Sword-God/' 64 | author = 'Xin Xing Xiao Yao (心星逍遥)' 65 | cover_file = 'Covers/chaotic-sword-god.jpg' 66 | title = 'Chaotic Sword God - Vol' 67 | 68 | synopsis_text = """ 69 | Jian Chen, the publicly recognized number one expert of the Jianghu. His skill 70 | with the sword went beyond perfection and was undefeatable in battle, After a 71 | battle with the exceptional expert Dugu Qiubai who had gone missing over a 72 | hundred years ago, Jian Chen succumbed to his injuries and died.
73 | 74 |After death, Jian Chen’s spirit was transmigrated into a completely foreign 75 | world. Following an extremely fast growth, his enemies piled up one after 76 | another before becoming gravely injured once more. On the gates of death, his 77 | spirit had mutated, and from that moment henceforth, he would tread on a 78 | completely different path of the art of the sword to become the sword god of 79 | his generation.
80 | 81 |Strength System, from low to high — Saint, Great Saint, Saint Master, Great 82 | Saint Master, Earth Saint Master, Heaven Saint Master, Saint Ruler, Saint King, 83 | Saint Emperor.
84 | 85 |A Xuanhuan webnovel. 86 | """ 87 | 88 | 89 | def genlist(start, end): 90 | global origin 91 | list_page = common.get_html(origin) 92 | chapterlist = [] 93 | for i in range(start, end+1): 94 | # print(i) 95 | if i == 484: 96 | text = "Chapter 384: To War One" 97 | elif i == 818: 98 | text = "Chapter 718: Saint Ruler Killing Formation" 99 | elif i == 1549: 100 | text = "Chapter 1548: Driven Back One" 101 | elif i == 2998: 102 | continue 103 | else: 104 | text = "Chapter %s((: )|( - )|( – ))" % str(i) 105 | link = list_page.find('a', text=re.compile(text)) 106 | url = "%s%s" % (origin, link['href'].split("/")[-1]) 107 | chapterlist.append(url) 108 | return chapterlist 109 | 110 | 111 | def clean(content): 112 | return content 113 | -------------------------------------------------------------------------------- /Novels/atg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 24/01/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1 - Red-Colored calamity', 30 | 0, 100), 31 | '2': Volume('2 - Blue Wind continent', 32 | 101, 200), 33 | '3': Volume('3 - Name that shakes the Profound Sky', 34 | 201, 300), 35 | '4': Volume('4 - Fury that burns the heavens', 36 | 301, 400), 37 | '5': Volume('5 - Primordial Profound Ark', 38 | 401, 500), 39 | '6': Volume('6 - Lordship in Illusory Demon', 40 | 501, 650), 41 | '7': Volume('7 - Heaven Smiting shakes the world', 42 | 651, 800), 43 | '8': Volume('8 - Cloud\'s End Mirage', 44 | 801, 900), 45 | '9': Volume('9 - Realm of the gods', 46 | 901, 1000), 47 | '10': Volume('10 - Snow Song\'s flame God', 48 | 1001, 1100), 49 | '11': Volume('11 - Profound God convention', 50 | 1101, 1200), 51 | '12': Volume('12 - Infatuation in dreams', 52 | 1201, 1300), 53 | '13': Volume('13 - Demise of life and soul', 54 | 1301, 1400), 55 | '14': Volume('14 - Crimson calamity', 56 | 1401, 1500), 57 | '15': Volume('15 - When hope dies, the devil awakens', 58 | 1501, 1600), 59 | '16': Volume('16 - Emperor of the North', 60 | 1601, 1700), 61 | '17': Volume('17 - Advent of Yun', 62 | 1701, 1800), 63 | '18': Volume('18 - Night of Calamity has yet to End', 64 | 1801, 1900), 65 | '19': Volume('19 - Ancient Abyss', 66 | 1901, 1924), 67 | # 68 | 'X': Volume('X - END', 69 | 0000, 0000) 70 | # As of Jan 2020, the translation is up to date with the original 71 | # source and there is no way to know how many chapters/volumes may 72 | # be in the future. 73 | } 74 | 75 | origin = 'http://www.wuxiaworld.com/novel/against-the-gods/' 76 | author = 'Mars Gravity (火星引力)' 77 | cover_file = 'Covers/againstthegods-225x300.jpg' 78 | title = 'Against the Gods - Vol' 79 | 80 | synopsis_text = """ 81 | Official description:
82 |Wielding the Sky Poison Pearl, receiving the blood of an Evil God, 83 | cultivating the strength to oppose heaven, a lord overlooking the world!
84 | 85 |
Synopsis by alyschu:
86 |A boy is being chased by various people because he alone holds some kind of 87 | treasure. He jumps off a cliff to not let any of them have it and wakes up in 88 | the body of a boy with the same name in another world. Fortunately, he has kept 89 | the treasure he ran off with. 90 | """ 91 | 92 | 93 | def genlist(start, end): 94 | global origin 95 | chapterlist = [] 96 | for i in range(start, end+1): 97 | if i == 761: 98 | url = origin + "atg-chapter-" + str(i) 99 | chapterlist.append(url) 100 | url = origin + "atg-chapter-" + str(i) + "-05" 101 | chapterlist.append(url) 102 | if i in [1043, 1044]: 103 | url = origin + "chapter-" + str(i) 104 | chapterlist.append(url) 105 | else: 106 | url = origin + "atg-chapter-" + str(i) 107 | chapterlist.append(url) 108 | return chapterlist 109 | 110 | 111 | def clean(content): 112 | return content 113 | -------------------------------------------------------------------------------- /Novels/ed.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 22/12/18 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1800), 47 | '19': Volume('19', 1801, 1900), 48 | '20': Volume('20', 1901, 2000), 49 | '21': Volume('21', 2001, 2100), 50 | '22': Volume('22', 2101, 2200), 51 | '23': Volume('23', 2201, 2300), 52 | '24': Volume('24', 2301, 2400), 53 | '25': Volume('25', 2401, 2500), 54 | '26': Volume('26', 2501, 2600), 55 | '27': Volume('27', 2601, 2700), 56 | '28': Volume('28', 2701, 2800), 57 | '29': Volume('29', 2801, 2900), 58 | '30': Volume('30', 2901, 3000), 59 | '31': Volume('31', 3001, 3100), 60 | '32': Volume('32', 3101, 3200), 61 | '33': Volume('33', 3201, 3300), 62 | '34': Volume('34', 3301, 3400), 63 | '35': Volume('35', 3401, 3500), 64 | '36': Volume('36', 3501, 3600), 65 | '37': Volume('37', 3601, 3700), 66 | '38': Volume('38', 3701, 3800), 67 | '39': Volume('39', 3801, 3900), 68 | '40': Volume('40', 3901, 4000), 69 | '41': Volume('41', 4001, 4100), 70 | '42': Volume('42', 4101, 4122), 71 | # 72 | '43': Volume('43', 4201, 4201), 73 | '44': Volume('44', 4301, 4301), 74 | '45': Volume('45', 4401, 4401), 75 | '46': Volume('46', 4501, 4501), 76 | # As of Mar 2021, there are 4300+ chapters in the original novel. 77 | } 78 | 79 | origin = 'https://www.wuxiaworld.com/novel/emperors-domination/' 80 | author = 'Yan Bi Xiao Sheng (厌笔萧生)' 81 | cover_file = 'Covers/ed.jpg' 82 | title = 'Emperor\'s domination - Vol' 83 | 84 | synopsis_text = """ 85 | Bao’s Synopsis: A boy that was imprisoned for millions of 86 | years had regained his mortal body. He became a disciple of the declining 87 | Cleansing Incense Ancient Sect where its patriarch used to be his disciple. 88 | Now, he will bring this sect back to its former glory.
89 | 90 |This is his journey to reach the apex and take revenge on those who had 91 | imprisoned him.
92 | 93 |This is his story of meeting old friends and making new companions.
94 | 95 |This is his path of traversing the Nine Worlds and becoming the next ruler 96 | of the Heavens.
97 | 98 |Qidian’s Synopsis: Ten million years ago, Li Qiye planted a 99 | simple water bamboo into the ground.Eight million years ago, Li Qiye had a koi 100 | fish pet.Five million years ago, Li Qiye cared for a little girl....In the 101 | present day, Li Qiye woke up from his slumber; the water bamboo reached the 102 | apex of cultivation; the koi fish became a Golden Dragon; the little girl 103 | became the Nine Worlds’ Immortal Empress.
104 | 105 |This is a tale regarding an immortal human who was the teacher of the Demon 106 | Saint, Heavenly Beast, and Immortal Empress. 107 | """ 108 | 109 | 110 | def genlist(start, end): 111 | global origin 112 | chapterlist = [] 113 | for i in range(start, end+1): 114 | url = origin + "emperor-chapter-" + str(i) 115 | chapterlist.append(url) 116 | return chapterlist 117 | 118 | 119 | def clean(content): 120 | return content 121 | -------------------------------------------------------------------------------- /Novels/btf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1652), 46 | # 47 | '18': Volume('18', 1701, 1701), 48 | '19': Volume('19', 1801, 1801), 49 | '20': Volume('20', 1901, 1901), 50 | # As of May 2021, there are 10855+ chapters in the original novel. 51 | # As of Nov 2021, there are 11547+ chapters in the original novel. 52 | } 53 | 54 | origin = 'http://m.wuxiaworld.xyz/Bringing-The-Farm-To-Live-In-Another-World/' 55 | author = 'Ming Yu (明宇)' 56 | cover_file = 'Covers/bringing-the-farm.jpg' 57 | title = 'Bringing the farm to live in another world - Vol' 58 | 59 | synopsis_text = """ 60 | “If he’s being badass, I’m gonna plant my own crops. If he messes with me, he 61 | will not live past next year.”
62 | 63 |Homebody Zhao Hai brought ‘QQ Farm’ along in his traversal to another world 64 | and resided within the body of a fallen noble. His fief was a black land which 65 | nothing could be planted, and more importantly, he even had a peerlessly 66 | powerful fiancee, who was actually the successor of a duchy and future Grand 67 | Duchess!
68 | 69 |Even more importantly, he is a magical and martial cripple who could not 70 | learn magic and martial arts. His crippling was very thorough.
71 | 72 |“I can’t learn magic, but I have the farm. You dare attack me? I’ll release 73 | bugs to eat up your rations and crops, and put pesticides and weed agents into 74 | your water sources to make your lands grow weeds. See if you dare to attack me. 75 | What? You wanna hire killers to assassinate me? Hehehe. I’ll hide inside the 76 | little house in my farm and see how you can attack me. When you leave, I’m 77 | gonna terminate your country’s crop productions, and then all of your people 78 | will revolt. See if you dare to kill me.”
79 | 80 |Watch how this somewhat black hearted hobo uses his QQ Farm in the world of 81 | swords and magic to become a globally known nightmarish existence. 82 | """ 83 | 84 | 85 | def genlist(start, end): 86 | global origin 87 | list_page = common.get_html(origin) 88 | origin2 = "http://m.wuxiaworld.xyz/" 89 | chapterlist = [] 90 | for i in range(start, end+1): 91 | # print(i) 92 | text = '^Chapter %s .*' % str(i) 93 | if i in range(127, 137): 94 | text = '^Chapter %s' % str(i) 95 | elif i in [149, 861, 1044, 1212]: 96 | text = '^Chapter %s-.*' % str(i) 97 | elif i == 283: 98 | text = '^Chapter 284 – Special Requests' 99 | elif i == 284: 100 | text = '^Chapter 284 – Seeing West Wonder King' 101 | elif i == 311: 102 | text = '^Chapter 312 – Playing the Role of A Silkpants' 103 | elif i == 312: 104 | text = '^Chapter 312 – Keeping Up Appearances' 105 | elif i == 1350: 106 | continue 107 | link = list_page.find('a', text=re.compile(text)) 108 | url = origin2 + link['href'].split("/")[-1] 109 | chapterlist.append(url) 110 | chapterlist = list(dict.fromkeys(chapterlist)) 111 | return chapterlist 112 | 113 | 114 | def clean(content): 115 | credline = re.compile(r'Translator:.*Editor:.*') 116 | for i in content.find_all(text=credline): 117 | i.replaceWith('') 118 | return content 119 | -------------------------------------------------------------------------------- /Novels/Complete/sr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 25/07/18 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1', 30 | 1, 100), 31 | '2': Volume('2', 32 | 101, 200), 33 | '3': Volume('3', 34 | 201, 300), 35 | '4': Volume('4', 36 | 301, 400), 37 | '5': Volume('5', 38 | 401, 500), 39 | '6': Volume('6', 40 | 501, 603), 41 | '7': Volume('7', 42 | 601, 700), 43 | '8': Volume('8', 44 | 701, 800), 45 | '9': Volume('9', 46 | 801, 900), 47 | '10': Volume('10', 48 | 901, 1000), 49 | '11': Volume('11', 50 | 1001, 1100), 51 | '12': Volume('12', 52 | 1101, 1200), 53 | '13': Volume('13', 54 | 1201, 1300), 55 | '14': Volume('14', 56 | 1301, 1400), 57 | '15': Volume('15', 58 | 1401, 1500), 59 | '16': Volume('16', 60 | 1501, 1600), 61 | '17': Volume('17', 62 | 1601, 1700), 63 | '18': Volume('18', 64 | 1701, 1800), 65 | '19': Volume('19', 66 | 1801, 1841), 67 | # 1841 is last chapter 68 | } 69 | 70 | origin = 'http://www.wuxiaworld.com/novel/spirit-realm/' 71 | author = 'Ni Cang Tian (逆蒼天)' 72 | cover_file = 'Covers/spirit-realm.jpg' 73 | title = 'Spirit Realm - Vol' 74 | 75 | synopsis_text = """ 76 | Thirty thousand years ago, the Heaven Fighting Race who called themselves 77 | “Gods” invaded Spirit Realm. Hundreds of races rose up in resistance, but 78 | ultimately suffered a crushing defeat. The human race was the first to concede, 79 | and the rest of the Hundred Races soon followed in succession.
80 | 81 |During the subsequent ten thousand years, all of the races were enslaved by 82 | the Heaven Fighting Race. They were cruelly treated, and lived beneath the 83 | shadow of terror.
84 | 85 |The Heaven Fighting Race’s march of conquest did not stop there. With Spirit 86 | Realm as the starting point, they invaded other secret dimensions, and spread 87 | war to all corners of existence. After greatly exhausting their combat 88 | strength, they were finally defeated by the Hundred Races who took advantage of 89 | this opportunity. With no other choice, they fled to the starry skies outside 90 | the realm.
91 | 92 |Thirty thousand years later, in an era where the Heaven Fighting Race has 93 | already faded to become ancient legend, an amnesiac youth possessing the Heaven 94 | Fighting Race’s bloodline is being fostered in an insignificant household. 95 | Whilst struggling to live on, he silently awaits the day of the bloodline’s 96 | awakening. 97 | """ 98 | 99 | 100 | def genlist(start, end): 101 | global origin 102 | chapterlist = [] 103 | for i in range(start, end+1): 104 | if i not in [833, ]: 105 | url = origin + "sr-chapter-" + str(i) 106 | # url = origin + "ast-chapter-" + str(i) 107 | # if i == 28: 108 | # url = origin + "ast-chapter-28-1" 109 | # elif i == 115: 110 | # url = origin + "ast-chapter-5-1" 111 | # elif i == 232: 112 | # url = origin + "ast-chapter-232-part-1000" 113 | # elif i in [246, 248]: 114 | # url = origin + "ast-chapter-" + str(i) + "-part-1" 115 | # elif i == 329: 116 | # url = origin + "ast-chapter-329-part-4" 117 | # elif i == 1421: 118 | # url = origin + "chapter-1421" 119 | # elif i == 1661: 120 | # url = origin + "ast-chapter-16611" 121 | chapterlist.append(url) 122 | return chapterlist 123 | 124 | 125 | def clean(content): 126 | return content 127 | -------------------------------------------------------------------------------- /Novels/Complete/pmg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 29/06/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1800), 47 | '19': Volume('19', 1801, 1900), 48 | '20': Volume('20', 1901, 2000), 49 | '21': Volume('21', 2001, 2100), 50 | '22': Volume('22', 2101, 2200), 51 | '23': Volume('23', 2201, 2300), 52 | '24': Volume('24', 2301, 2400), 53 | '25': Volume('25', 2401, 2500), 54 | } 55 | 56 | origin = 'http://www.wuxiaworld.co/Peerless-Martial-God/' 57 | author = 'Jing Wu Hen (净无痕)' 58 | cover_file = 'Covers/pmg.jpg' 59 | title = 'Peerless martial God - Vol' 60 | 61 | synopsis_text = """ 62 | Lin Feng tried to be the diligent and hard-working good guy. He studied hard, 63 | did his best to make his family proud and not get into trouble, but when he saw 64 | a girl being taken advantage of, he had to intervene. He had been tricked, 65 | sentenced to 10 years in jail and framed for a crime he never committed, all 66 | was lost. If his life was over he would take those who ruined his life with 67 | him.
68 | 69 |Suddenly he opens his eyes again. He is not dead, but alive in the body of 70 | the Lin Feng of a different world. This Lin Feng had been killed as trash of 71 | cultivation. This world where the strong had no regard for human life and would 72 | kill freely if they had the strength. Called “trash” and thrown away, with 73 | vengeance in his heart he will rise to new heights opposing the will of heaven 74 | and earth.
75 | 76 |“Do not judge others in ignorance within my presence.
77 | 78 |Those who think to harm someone should be ready to be harmed.
79 | 80 |Those who are open and respectful shall receive my kindness and respect.
81 | 82 |Those who plot against me are seeking their own death.
83 | 84 |This is true, for I am death… I am Lin Feng” 85 | """ 86 | 87 | 88 | def genlist(start, end): 89 | global origin 90 | list_page = common.get_html(origin) 91 | chapterlist = [] 92 | for i in range(start, end+1): 93 | # print(i) 94 | if i in range(1051, 1056+1) or i in [1441, 1537, 1883, 2450] or \ 95 | i in range(2481, 2485+1): 96 | text = "Chapter %s" % str(i) 97 | elif i == 1124: 98 | text = "Chapter 1124: Soon Getting Nature pills" 99 | elif i == 1224: 100 | text = "Chapter 1124: Qiu Yue Xin" 101 | elif i == 1936: 102 | text = "Chaoter %s:" % str(i) 103 | elif i == 2024: 104 | text = "Chapter 2024: Collapsing Sky" 105 | elif i == 2124: 106 | text = "Chapter 2024: Deployment" 107 | elif i == 2237: 108 | text = "Chapter 2237: Fighting" 109 | elif i == 2337: 110 | text = "Chapter 2237: Sky Palace" 111 | elif i == 2243: 112 | text = "Chapter 2243: Name List" 113 | elif i == 2343: 114 | text = "Chapter 2243: Devouring" 115 | elif i in range(2476, 2480+1): 116 | text = "Chapters %s" % str(i) 117 | else: 118 | text = "^Chapter %s:" % str(i) 119 | link = list_page.find('a', text=re.compile(text)) 120 | url = "%s%s" % (origin, link['href'].split("/")[-1]) 121 | chapterlist.append(url) 122 | return chapterlist 123 | 124 | 125 | def clean(content): 126 | return content 127 | -------------------------------------------------------------------------------- /Novels/mansion.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 29), 30 | '2': Volume('2', 30, 85), 31 | '3': Volume('3', 86, 209), 32 | '4': Volume('4', 210, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1571), 45 | # 46 | # This novel ends in chapter 1610 47 | } 48 | 49 | origin = 'http://www.wuxiaworld.co/I-Have-a-Mansion-in-the-Post-apocalyptic-World/' 50 | author = 'Morning Star LL (晨星LL)' 51 | cover_file = 'Covers/Mansion.jpg' 52 | title = 'I have a mansion in the post-apocalyptic world - Vol' 53 | 54 | synopsis_text = """ 55 | Ruins stretched across the landscape in the apocalypse after the nuclear 56 | war.
57 | 58 |If you accidentally survived on the wasteland, then you must be ready to 59 | face the endless hunger, ceaseless dangers, the mad zombies at night, and the 60 | peculiar mutant creatures that are the aftermaths of the constant 61 | radiation.
62 | 63 |But for Jiang Chen, this place was heaven.
64 | 65 |Mansions stood tall, luxurious cars parked on the street, high tech products 66 | and gold abandoned everywhere.
67 | 68 |What? You were the president of a game development company before the war? 69 | You were responsible for the development of the 3D virtual reality online 70 | multiplayer game? Well, that’s great, why don’t you come work for me. The 71 | salary is two pieces of bread a day.
72 | 73 |iPhone? Ultra thin design? Don’t you see that the phone I invented are 74 | thinner than condoms?
75 | 76 |Aircraft carrier? Fighter jets? Oh, I have those things as well, but they 77 | are designed for space combat.
78 | 79 |Watch the story of Jiang Chen, who possessed the ability to travel through 80 | space and time, as he witness the creation of an empire stretched across space 81 | and time.. 82 | """ 83 | 84 | 85 | def genlist(start, end): 86 | global origin 87 | list_page = common.get_html(origin) 88 | chapterlist = [] 89 | for i in range(start, end+1): 90 | # print(i) 91 | text = '^%s .*' % str(i) 92 | # if i in range(127, 137): 93 | # text = '^Chapter %s' % str(i) 94 | # elif i in [149, 861]: 95 | # text = '^Chapter %s-.*' % str(i) 96 | # elif i == 283: 97 | # text = '^Chapter 284 – Special Requests' 98 | # elif i == 284: 99 | # text = '^Chapter 284 – Seeing West Wonder King' 100 | # elif i == 311: 101 | # text = '^Chapter 312 – Playing the Role of A Silkpants' 102 | # elif i == 312: 103 | # text = '^Chapter 312 – Keeping Up Appearances' 104 | link = list_page.find('a', text=re.compile(text)) 105 | url = origin + link['href'].split("/")[-1] 106 | chapterlist.append(url) 107 | return chapterlist 108 | 109 | 110 | def clean(content): 111 | credline = re.compile(r'Translator:.*Editor:.*') 112 | for i in content.find_all(text=credline): 113 | i.replaceWith('') 114 | warpEngine = re.compile(r'wrap engine') 115 | for i in content.find_all(text=warpEngine): 116 | istring = re.sub(warpEngine, 'warp engine', i) 117 | i.replaceWith(istring) 118 | firstCorp = re.compile(r'First Crop') 119 | for i in content.find_all(text=firstCorp): 120 | istring = re.sub(firstCorp, 'First Corp', i) 121 | i.replaceWith(istring) 122 | spam = re.compile(r'Find.*authorized.*Webnovel.*click.*visiting.*') 123 | for i in content.find_all(text=spam): 124 | print(' Spam') 125 | istring = re.sub(spam, '', i) 126 | i.replaceWith(istring) 127 | dragoncavalry = re.compile(r'Dragon Calvary') 128 | for i in content.find_all(text=dragoncavalry): 129 | print(' Dragon Cavalry') 130 | istring = re.sub(dragoncavalry, 'Dragon Cavalry', i) 131 | i.replaceWith(istring) 132 | return content 133 | -------------------------------------------------------------------------------- /Novels/Complete/tmw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1 - Lian tribal clan', 30 | 1, 80), 31 | '2': Volume('2 - Kingdom selection', 32 | 81, 141), 33 | '3': Volume('3 - Divine Capital', 34 | 142, 156), 35 | '4': Volume('4 - Tai Ah Divine city', 36 | 157, 212), 37 | '5': Volume('5 - Rookie ranking competition', 38 | 213, 254), 39 | '6': Volume('6 - Desolate Heaven master', 40 | 255, 277), 41 | '7': Volume('7 - Divine Wilderness', 42 | 278, 302), 43 | '8': Volume('8 - City Lords birthday banquet', 44 | 303, 343), 45 | '9': Volume('9 - Tai Ah Divine Kingdom calamity', 46 | 344, 372), 47 | '10': Volume('10 - Desolate Heaven technique tea session', 48 | 373, 407), 49 | '11': Volume('11 - Great Empress relic trial', 50 | 408, 427), 51 | '12': Volume('12 - Great Empress mystic realm', 52 | 428, 542), 53 | '13': Volume('13 - Post Great Empress mystic realm', 54 | 543, 602), 55 | '14': Volume('14 - Blackstone trials', 56 | 603, 662), 57 | '15': Volume('15 - Tian Yuan world disaster', 58 | 663, 683), 59 | '16': Volume('16 - Divine Wilderness escapade', 60 | 684, 718), 61 | '17': Volume('17 - Black-armored Demon God', 62 | 719, 767), 63 | '18': Volume('18 - 12 Empyrean Heavens', 64 | 768, 802), 65 | '19': Volume('19 - Pre-Luo Divine Hall trials', 66 | 803, 854), 67 | '20': Volume('20 - Empress Luos banquet', 68 | 855, 871), 69 | '21': Volume('21 - Luo Divine Hall trials', 70 | 872, 916), 71 | '22': Volume('22 - Alliance chanllenger', 72 | 917, 949), 73 | '23': Volume('23 - Disciple recruitment', 74 | 950, 988), 75 | '24': Volume('24 - Azure Wood Great World', 76 | 989, 1100), 77 | '25': Volume('25', 1101, 1200), 78 | '26': Volume('26', 1201, 1300), 79 | '27': Volume('27', 1301, 1400), 80 | '28': Volume('28', 1401, 1500), 81 | '29': Volume('29', 1501, 1600), 82 | '30': Volume('30', 1601, 1710), 83 | } 84 | 85 | origin = 'http://www.wuxiaworld.co/True-Martial-World/' 86 | author = 'Canjian Li De Niu/Cocooned Cow (蚕茧里的牛)' 87 | cover_file = 'Covers/true-martial-world.jpg' 88 | title = 'True Martial World - Vol' 89 | 90 | synopsis_text = """ 91 | With the strongest experts from the 33 Skies, the Human Emperor, Lin Ming 92 | and his opponent, the Abyssal Demon King were embroiled in a final battle. 93 | It ended with the Human Emperor destroying the Abyssal World and killing the 94 | Abyssal Demon King. By then, a godly artifact, the mysterious purple card 95 | that had previously sealed the Abyssal Demon King, had long disappeared into 96 | the space-time vortex and tunneled through infinite space-time, with a loved 97 | one of Lin Ming accompanying it.
98 | 99 |In the vast wilderness, where martial arts was still slowly growing in its 100 | infancy, several peerless masters tried to find their path in the world of 101 | martial arts.
102 | 103 |A young adult named Yi Yun from modern Earth had unwittingly stumbled into 104 | such a world and began that journey with a purple card of unknown origin.
105 | 106 |It’s a magnificent yet unknown true martial art world. This is the story of 107 | a normal young adult turning into a legendary peerless expert. 108 | """ 109 | 110 | 111 | def genlist(start, end): 112 | global origin 113 | list_page = common.get_html(origin) 114 | chapterlist = [] 115 | for i in range(start, end+1): 116 | text = '^' + str(i) + '.*' 117 | link = list_page.find('a', text=re.compile(text)) 118 | url = origin + link['href'].split("/")[-1] 119 | chapterlist.append(url) 120 | return chapterlist 121 | 122 | 123 | def clean(content): 124 | return content 125 | -------------------------------------------------------------------------------- /Novels/pbs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 04/11/18 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import common 26 | import re 27 | Volume = common.Volume 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 900), 38 | '10': Volume('10', 901, 1000), 39 | '11': Volume('11', 1001, 1100), 40 | '12': Volume('12', 1101, 1200), 41 | '13': Volume('13', 1201, 1300), 42 | '14': Volume('14', 1301, 1400), 43 | '15': Volume('15', 1401, 1500), 44 | '16': Volume('16', 1501, 1600), 45 | '17': Volume('17', 1601, 1700), 46 | '18': Volume('18', 1701, 1723), 47 | # 48 | '19': Volume('19', 1801, 1801), 49 | '20': Volume('20', 1901, 2901), 50 | '21': Volume('21', 2001, 2001), 51 | '22': Volume('22', 2101, 2101), 52 | '23': Volume('23', 2201, 2201), 53 | '24': Volume('24', 2301, 2301), 54 | '25': Volume('25', 2401, 2401), 55 | '26': Volume('26', 2501, 2501), 56 | '27': Volume('27', 2601, 2601), 57 | '28': Volume('28', 2701, 2701), 58 | '29': Volume('29', 2801, 2801), 59 | '30': Volume('30', 2901, 2901), 60 | # As of Apr 2020, there are 3063+ chapters in the original novel 61 | } 62 | 63 | origin = 'http://www.wuxiaworld.co/Peerless-Battle-Spirit/' 64 | author = 'Supreme Villain (极品妖孽)' 65 | cover_file = 'Covers/peerless-battle-spirit.jpg' 66 | title = 'Peerless Battle Spirit - Vol' 67 | 68 | synopsis_text = """ 69 | RAW Synopsis
70 | 71 |A young master of a clan started out with a useless Martial Spirit. However, 72 | he coincidentally ended up awakening the atavistically-mysterious Divine Battle 73 | Spirit. Since then, he began climbing to the top starting from the very bottom, 74 | stumbling into glamorous beauties while crushing every genius he encounters 75 | under his feet.
76 | 77 |"There is none He does not fight against, and none He does not win 78 | against!"
79 | 80 |Translator's Synopsis
81 | 82 |In the Canglan Continent, there existed a rule: only those who managed to 83 | awaken a Martial Spirit were able to pursue the path of cultivation, and a 84 | Martial Spirit's rank was determined when it was awakened. Born in Linshui 85 | City, Qin Nan was a peerless genius who possessed great talents and was highly 86 | anticipated to become a great cultivator in the future. However, things changed 87 | when he ended up awakening the lowest-grade Martial Spirit, resulting in him 88 | being considered trash.
89 | 90 |Fortunately, when Qin Nan was struck by a ray of lightning at a young age, 91 | he coincidentally obtained the atavistic Divine Battle Spirit, which was 92 | capable of ranking up, breaking the ultimate rule of the Canglan Continent. 93 | Little did he know that his Martial Spirit possessed a great secret, which 94 | would continue to be unveiled as he learns more about the story of the Divine 95 | Battle Spirit.
96 | 97 |What is the secret behind the Divine Battle Spirit? What is the curse of the 98 | Canglan Continent? Who exactly is the Divine God of Battle?
99 | 100 |Join Qin Nan and his companions along their journey, battling against 101 | various opponents, outsmarting their enemies, and seeking the answers to unveil 102 | mysteries!
103 | 104 |“Master, please bring me along on your journey battling against the Nine 105 | Heavens, will you?” 106 | """ 107 | 108 | 109 | def genlist(start, end): 110 | global origin 111 | list_page = common.get_html(origin) 112 | chapterlist = [] 113 | for i in range(start, end+1): 114 | if i not in [295, 773]: 115 | if i == 94: 116 | text = "^Chapater" 117 | else: 118 | text = "^Chapter %s((:)|( -)|( –)|(, 295 -)|(/773 -))" % i 119 | link = list_page.find('a', text=re.compile(text)) 120 | url = "%s%s" % (origin, link['href'].split("/")[-1]) 121 | chapterlist.append(url) 122 | return chapterlist 123 | 124 | 125 | def clean(content): 126 | credline = re.compile(r'(Translator:.*)|(Editor:.*)|(XephiZ)|(DOCuinn)') 127 | for i in content.find_all(text=credline): 128 | i.replaceWith('') 129 | for i in content.find_all('hr'): 130 | i.decompose() 131 | return content 132 | -------------------------------------------------------------------------------- /libs/gs_epub.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2019 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 5/01/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import string 26 | from string import Template 27 | import ebooklib 28 | from ebooklib import epub 29 | 30 | 31 | # Limit chapter file names to characters that wont cause problems. 32 | VALID_CHARS = "-_.() %s%s" % (string.ascii_letters, string.digits) 33 | 34 | ############################################################################### 35 | # TODO: Remove this block when the fix is propagated to most distros 36 | # Something goes wrong when adding an image as a cover, and we need to work 37 | # around it by replacing the get_template function with our own that takes care 38 | # of properly encoding the template as utf8. 39 | # The bug was fixed upstream but debian/ubuntu and others haven't packaged new 40 | # releases of ebooklib since 2014. 41 | # This will become unnecessary once v0.16 enters the repositories 42 | if ebooklib.VERSION < (0, 16, 0): 43 | original_get_template = epub.EpubBook.get_template 44 | 45 | def new_get_template(*args, **kwargs): 46 | return original_get_template(*args, **kwargs).encode(encoding='utf8') 47 | 48 | epub.EpubBook.get_template = new_get_template 49 | ############################################################################### 50 | 51 | 52 | class MyBook: 53 | def __init__(self, identifier, title, language, application): 54 | self.title = title 55 | self.application = application 56 | self.has_cover = False 57 | self.all_chapters = [] 58 | self.intro_ch = "" 59 | self.body_css = "" 60 | self.book = epub.EpubBook() 61 | self.book.set_identifier(identifier) 62 | self.book.set_title(self.title) 63 | self.book.set_language(language) 64 | self.book.add_metadata('DC', 'subject', self.application) 65 | 66 | def add_labels(self, labels): 67 | for label in labels: 68 | self.book.add_metadata('DC', 'subject', label) 69 | 70 | def add_cover(self, cover_file): 71 | with open(cover_file, 'rb') as cover: 72 | self.book.set_cover(file_name='cover.jpg', content=cover.read(), 73 | create_page=True) 74 | self.has_cover = True 75 | 76 | def add_chapter(self, ch_title, ch_file, ch_lang, ch_text): 77 | # Replace non ascii hyphens with ascii ones 78 | ch_file = ch_file.replace('–', '-') + '.xhtml' 79 | # Remove any remaining non-ascii characters from file name to avoid 80 | # problems 81 | ch_file = ''.join(c for c in ch_file if c in VALID_CHARS) 82 | chapter = epub.EpubHtml(title=ch_title, file_name=ch_file, 83 | lang=ch_lang) 84 | chapter.content = ch_text 85 | self.book.add_item(chapter) 86 | self.all_chapters.append(chapter) 87 | 88 | def add_nav_style(self, css): 89 | # Define the CSS style 90 | nav_css = epub.EpubItem(uid="style_nav", file_name="style/nav.css", 91 | media_type="text/css", content=css) 92 | # Add the style as a file 93 | self.book.add_item(nav_css) 94 | 95 | def add_body_style(self, css): 96 | # Define the CSS style 97 | self.body_css = epub.EpubItem(uid="style_body", 98 | file_name="style/body.css", 99 | media_type="text/css", content=css) 100 | # Add the style as a file 101 | self.book.add_item(self.body_css) 102 | 103 | def add_intro(self, author, url, synopsis, template_file): 104 | self.intro_ch = epub.EpubHtml(title='Introduction', 105 | file_name='intro.xhtml') 106 | self.intro_ch.add_item(self.body_css) 107 | with open(template_file) as infile: 108 | in_template = Template(infile.read()) 109 | self.intro_ch.content = in_template.substitute(title=self.title, 110 | author=author, 111 | url=url, 112 | synopsis=synopsis) 113 | self.book.add_item(self.intro_ch) 114 | 115 | def finalize(self): 116 | # Define Table of Content 117 | self.book.toc = (epub.Link('intro.xhtml', 'Introduction', 'intro'), 118 | (epub.Section('Chapters'), self.all_chapters)) 119 | # Add default NCX and NAV 120 | self.book.add_item(epub.EpubNcx()) 121 | self.book.add_item(epub.EpubNav()) 122 | 123 | # Add basic spine 124 | myspine = [] 125 | if self.has_cover: 126 | myspine.append('cover') 127 | myspine.extend([self.intro_ch, 'nav']) 128 | myspine.extend(self.all_chapters) 129 | self.book.spine = myspine 130 | 131 | def write(self, filename): 132 | epub.write_epub(filename, self.book, {}) 133 | -------------------------------------------------------------------------------- /Novels/lls.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 19/02/19 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 100), 30 | '2': Volume('2', 101, 200), 31 | '3': Volume('3', 201, 300), 32 | '4': Volume('4', 301, 400), 33 | '5': Volume('5', 401, 500), 34 | '6': Volume('6', 501, 600), 35 | '7': Volume('7', 601, 700), 36 | '8': Volume('8', 701, 800), 37 | '9': Volume('9', 801, 851), 38 | # 39 | '10': Volume('10', 901, 900), 40 | '11': Volume('11', 1001, 1001), 41 | '12': Volume('12', 1101, 1101), 42 | '13': Volume('13', 1201, 1201), 43 | '14': Volume('14', 1301, 1301), 44 | # This novel ends with chapter 1399. 45 | } 46 | 47 | origin = 'http://www.wuxiaworld.co/Long-Live-Summons/' 48 | author = 'Xia Fei Shuang Jia (霞飞双颊)' 49 | cover_file = 'Covers/Long-Live-Summons.jpg' 50 | title = 'Long Live Summons - Vol' 51 | 52 | synopsis_text = """ 53 |
The Soaring Dragon Continent is a world of summons, you can only become 54 | strong if you become a summoner! Yue Yang, an average high school boy, was 55 | suddenly transported into this world. When he woke up, he was greeted with a 56 | lot of worried faces and found out that he had assumed another person’s 57 | identity. Turns out he’s the good-for-nothing third son of the Yue Family, who 58 | had just recently drowned himself because of a failed engagement. Unlike the 59 | third son of the Yue Family who was useless in summoning, Yue Yang succeeded in 60 | making a contract with a summoning grimoire on his first try, even when the 61 | other guy failed for the past fifteen years. Others would have a headache 62 | making contracts with beasts afterwards, but countless beasts tried to gain 63 | favour with Yue Yang instead, acting like a good kid before him. 64 | 65 |Yue Yang the brat, however, didn’t feel grateful at all: “Scram, Mythical 66 | Beasts! Do you think you are cool like that? Go away from me now, I only like 67 | beautiful summons!”
68 | 69 |Even when royal families approached him for his talents, the shameless brat 70 | replied, “I’m not interested in government stuff, I’m only interested in 71 | beauties!” 72 | """ 73 | 74 | 75 | def genlist(start, end): 76 | global origin 77 | list_page = common.get_html(origin) 78 | chapterlist = [] 79 | for i in range(start, end+1): 80 | # print(i) 81 | if i in [186, 284, 286, 293, 295, 296, 361]: 82 | # Some chapters have 2 parts, first kind (with: –) 83 | text = '^Chapter %s Part 1 – .*' % str(i) 84 | link = list_page.find('a', text=re.compile(text)) 85 | url = origin + link['href'].split("/")[-1] 86 | chapterlist.append(url) 87 | text = '^Chapter %s Part 2 – .*' % str(i) 88 | elif i in range(717, 753): 89 | # Some chapters have 2 parts, second kind (no separator) 90 | text = '^Chapter %s .* Part 1' % str(i) 91 | link = list_page.find('a', text=re.compile(text)) 92 | url = origin + link['href'].split("/")[-1] 93 | chapterlist.append(url) 94 | text = '^Chapter %s .* Part 2' % str(i) 95 | elif i == 761: 96 | # Some chapters have 2 parts, third kind (with . for second part) 97 | text = '^Chapter %s: .*' % str(i) 98 | link = list_page.find('a', text=re.compile(text)) 99 | url = origin + link['href'].split("/")[-1] 100 | chapterlist.append(url) 101 | text = '^Chapter %s.2 .*' % str(i) 102 | elif i == 762 or (i >= 765 and i <= 816): 103 | # Some chapters have 2 parts, fourth kind (with . for both parts 104 | if i == 790: 105 | text = '^Chapter %s .1.*' % str(i) 106 | else: 107 | text = '^Chapter %s.1.*' % str(i) 108 | link = list_page.find('a', text=re.compile(text)) 109 | url = origin + link['href'].split("/")[-1] 110 | chapterlist.append(url) 111 | text = '^Chapter %s.2.*' % str(i) 112 | else: 113 | text = '^Chapter %s – .*' % str(i) 114 | if i == 212: 115 | text = '^Chapter %s- .*' % str(i) 116 | elif i == 356: 117 | text = '^Chapter 356' 118 | elif i in [647, 651, 763, 764]: 119 | text = '^Chapter %s - .*' % str(i) 120 | elif i >= 817: 121 | text = '^Chapter %s: .*' % str(i) 122 | link = list_page.find('a', text=re.compile(text)) 123 | url = origin + link['href'].split("/")[-1] 124 | chapterlist.append(url) 125 | return chapterlist 126 | 127 | 128 | def clean(content): 129 | credline = re.compile(r'Translator:.*Editor:.*') 130 | for i in content.find_all(text=credline): 131 | i.replaceWith('') 132 | return content 133 | -------------------------------------------------------------------------------- /Novels/Complete/cobi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 24/01/17 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | from common import Volume 26 | import common 27 | import re 28 | 29 | volumes = {'1': Volume('1', 1, 19), 30 | '2': Volume('2', 20, 37), 31 | '3': Volume('3', 38, 57), 32 | '4': Volume('4', 58, 78), 33 | '5': Volume('5', 79, 89), 34 | '6': Volume('6', 90, 104), 35 | '7': Volume('7', 105, 128), 36 | '8': Volume('8', 129, 150), 37 | '9': Volume('9', 151, 174), 38 | '10': Volume('10', 175, 205), 39 | '11': Volume('11', 206, 225), 40 | '12': Volume('12', 226, 250), 41 | '13': Volume('13', 251, 272), 42 | '14': Volume('14', 273, 292), 43 | '15': Volume('15', 293, 324), 44 | '16': Volume('16', 325, 352), 45 | '17': Volume('17', 353, 379), 46 | '18': Volume('18', 380, 403), 47 | '19': Volume('19', 404, 435), 48 | '20': Volume('20', 436, 475), 49 | '21': Volume('21', 476, 502), 50 | '22': Volume('22', 503, 523), 51 | '23': Volume('23', 524, 551), 52 | '24': Volume('24', 552, 584), 53 | '25': Volume('25', 585, 613), 54 | '26': Volume('26', 614, 656), 55 | '27': Volume('27', 657, 681), 56 | '28': Volume('28', 682, 709), 57 | '29': Volume('29', 710, 758), 58 | '30': Volume('30', 759, 789), 59 | '31': Volume('31', 790, 810), 60 | '32': Volume('32', 811, 841), 61 | '33': Volume('33', 842, 874), 62 | '34': Volume('34', 875, 899), 63 | '35': Volume('35', 900, 961), 64 | '36': Volume('36', 962, 996), 65 | '37': Volume('37', 997, 1020), 66 | '38': Volume('38', 1021, 1049), 67 | '39': Volume('39', 1050, 1098), 68 | '40': Volume('40', 1099, 1172), 69 | '41': Volume('41', 1173, 1223), 70 | '42': Volume('42', 1224, 1251), 71 | '43': Volume('43', 1252, 1278), 72 | '44': Volume('44', 1279, 1319), 73 | '45': Volume('45', 1320, 1354), 74 | '46': Volume('46', 1355, 1387), 75 | '47': Volume('47', 1388, 1424), 76 | '48': Volume('48', 1425, 1466), 77 | '49': Volume('49', 1467, 1507), 78 | '50': Volume('50', 1508, 1556), 79 | '51': Volume('51', 1557, 1591), 80 | '52': Volume('52', 1592, 1619), 81 | '53': Volume('53', 1620, 1646), 82 | '54': Volume('54', 1647, 1719), 83 | '55': Volume('55', 1720, 1771), 84 | '56': Volume('56', 1772, 1790), 85 | '57': Volume('57', 1791, 1855), 86 | '58': Volume('58', 1856, 1898), 87 | '59': Volume('59', 1899, 1976), 88 | '60': Volume('60', 1977, 2015), 89 | # The original novel ends at chapter 2012 of volume 60, but for some 90 | # reason the translation does not. Maybe some chapteres were split 91 | # in two parts or something like that. 92 | } 93 | 94 | origin = 'http://www.wuxiaworld.co/Castle-of-Black-Iron/' 95 | author = 'Drunken Tiger' 96 | cover_file = 'Covers/castle-of-black-iron.jpg' 97 | title = 'Castle of Black Iron - Vol' 98 | 99 | synopsis_text = """ 100 | After the Catastrophe, every rule in the world was rewritten.
101 | 102 |In the Age of Black Iron, steel, iron, steam engines and fighting force 103 | became the crux in which human beings depended on to survive.
104 | 105 |A commoner boy by the name Zhang Tie was selected by the gods of fortune and 106 | was gifted a small tree which could constantly produce various marvelous 107 | fruits. At the same time, Zhang Tie was thrown into the flames of war, a 108 | three-hundred-year war between humans and demons on the vacant continent. Using 109 | crystals to tap into the potentials of the human body, one must cultivate to 110 | become stronger.
111 | 112 |The thrilling legends of mysterious clans, secrets of Oriental fantasies, 113 | numerous treasures and legacies in the underground world — All in the Castle of 114 | Black Iron! 115 | """ 116 | 117 | 118 | def genlist(start, end): 119 | global origin 120 | list_page = common.get_html(origin) 121 | chapterlist = [] 122 | for i in range(start, end+1): 123 | text = '^' + str(i) + ' .*' 124 | link = list_page.find('a', text=re.compile(text)) 125 | url = origin + link['href'].split("/")[-1] 126 | chapterlist.append(url) 127 | return chapterlist 128 | 129 | 130 | def clean(content): 131 | credline = re.compile(r'Translator:.*Editor:.*') 132 | for i in content.find_all(text=credline): 133 | print(' Credline') 134 | i.replaceWith('') 135 | spam1 = re.compile(r'Find authorized.*Webnovel.*webnovel.*') 136 | for i in content.find_all(text=spam1): 137 | print(' Spam') 138 | istring = re.sub(spam1, '', i) 139 | i.replaceWith(istring) 140 | return content 141 | -------------------------------------------------------------------------------- /Novels/Complete/desolate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 25/12/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | from common import Volume 28 | 29 | volumes = {'1': Volume('1 - Ji Clan of Swallow Mountain', 30 | 1, 18), 31 | '2': Volume('2 - The lake in the East Mountain', 32 | 2, 18), 33 | '3': Volume('3 - Comprehending "The Way" by the pond', 34 | 3, 18), 35 | '4': Volume('4 - Underwater estate', 36 | 4, 20), 37 | '5': Volume('5 - Zifu disciple', 38 | 5, 26), 39 | '6': Volume('6 - Breaking through the cocoon, becoming a butterfly', 40 | 6, 38), 41 | '7': Volume('7 - Stillwater city', 42 | 7, 41), 43 | '8': Volume('8 - Raindragon guard', 44 | 8, 34), 45 | '9': Volume('9 - Ji Ning of Serpentwing lake', 46 | 9, 39), 47 | '10': Volume('10 - Entering the Immortal Estate', 48 | 10, 29), 49 | '11': Volume('11 - Primaltwin', 50 | 11, 36), 51 | '12': Volume('12 - Immortal destiny', 52 | 12, 40), 53 | '13': Volume('13 - Tristan Crescent Abode', 54 | 13, 36), 55 | '14': Volume('14 - Return to the Grand Xia', 56 | 14, 30), 57 | '15': Volume('15 - The sword eradicates Celestial Immortals', 58 | 15, 32), 59 | '16': Volume('16 - The Nihilum zone', 60 | 16, 25), 61 | '17': Volume('17 - Celestial immortal', 62 | 17, 27), 63 | '18': Volume('18 - Pure Yang', 64 | 18, 56), 65 | '19': Volume('19 - Empyrean God', 66 | 19, 55), 67 | '20': Volume('20 - Jindan upgrade', 68 | 20, 37), 69 | '21': Volume('21 - The Bloodlotus blooms', 70 | 21, 37), 71 | '22': Volume('22 - True God', 72 | 22, 29), 73 | '23': Volume('23 - Endwar', 74 | 23, 35), 75 | '24': Volume('24 - The Starlord of Fogstone', 76 | 24, 49), 77 | '25': Volume('25 - Novessence Thunder', 78 | 25, 40), 79 | '26': Volume('26 - World level', 80 | 26, 58), 81 | '27': Volume('27 - Twelve palaces', 82 | 27, 29), 83 | '28': Volume('28 - Archaeus region', 84 | 28, 48), 85 | '29': Volume('29 - Daolord', 86 | 29, 42), 87 | '30': Volume('30 - Ancient cultivator', 88 | 30, 36), 89 | '31': Volume('31 - Starflow river', 90 | 31, 24), 91 | '32': Volume('32 - Waveshift realm', 92 | 32, 28), 93 | '33': Volume('33 - Crimsonware temple', 94 | 33, 23), 95 | '34': Volume('34 - The stone hellephant wall', 96 | 34, 32), 97 | '35': Volume('35 - The Aeonian race', 98 | 35, 20), 99 | '36': Volume('36 - Daolord of the Fourth Step', 100 | 36, 30), 101 | '37': Volume('37 - Flamewing God', 102 | 37, 31), 103 | '38': Volume('38 - Daomerge', 104 | 38, 43), 105 | '39': Volume('39 - Nuwa', 106 | 39, 23), 107 | '40': Volume('40 - The five Autarchs', 108 | 40, 20), 109 | '41': Volume('41 - The Daoguard tower', 110 | 41, 26), 111 | '42': Volume('42 - The five Truncheon chapters', 112 | 42, 21), 113 | '43': Volume('43 - Final fate', 114 | 43, 25), 115 | '44': Volume('44 - The Dusk war', 116 | 44, 29), 117 | '45': Volume('45 - The fragrance of the Plum Blossom', 118 | 45, 18), 119 | } 120 | 121 | origin = 'http://www.wuxiaworld.com/novel/desolate-era/' 122 | author = 'I Eat Tomatoes (我吃西红柿)' 123 | cover_file = 'Covers/desolate-era.jpg' 124 | title = 'Desolate Era - Vol' 125 | 126 | synopsis_text = """ Fate had never been kind to Ji Ning. Wracked by illnesses 127 | and infirm his entire life on Earth, Ning knew early on that he would die as a 128 | teenager. What he didn’t know was that there really was such a thing as life 129 | after death, and that the universe was a far larger place than he thought. A 130 | lucky twist of fate (one of the few in Ning’s life) meant that Ning was reborn 131 | into a world of Immortals and monsters, of Ki Refiners and powerful Fiendgods, 132 | a world where Dynasties lasted for millions of years. A world which is both 133 | greater…and yet also smaller…than he ever could imagine. He would have the 134 | opportunity to join them, and in this life, Ning swore to himself, he would 135 | never let himself be weak again! The Era he was born into was a Desolate one, 136 | but Ning would make it his era. """ 137 | 138 | 139 | def genlist(start, end): 140 | global origin 141 | chapterlist = [] 142 | for i in range(1, end+1): 143 | url = origin + "de-book-" + str(start) + "-chapter-" + str(i) 144 | if start == 45 and i == 18: 145 | url = origin + "de-afterword" 146 | chapterlist.append(url) 147 | return chapterlist 148 | 149 | 150 | def clean(content): 151 | return content 152 | -------------------------------------------------------------------------------- /libs/common.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2016 GatoLoko 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | """ 20 | Created on 28/12/16 21 | 22 | @author: GatoLoko 23 | """ 24 | 25 | import re 26 | import string 27 | 28 | from bs4 import BeautifulSoup 29 | 30 | import gsweb 31 | 32 | novel_module = "" # pylint: disable=C0103 33 | 34 | # Limit chapter file names to characters that wont cause problems. 35 | VALID_CHARS = "-_.() %s%s" % (string.ascii_letters, string.digits) 36 | 37 | 38 | class Volume(): 39 | def __init__(self, title, first, last): 40 | self.title = title 41 | self.first = first 42 | self.last = last 43 | 44 | 45 | def get_html(url): 46 | return gsweb.get_soup(url) 47 | 48 | 49 | def get_wuxiaworld_com(html): 50 | html_title = html.find('title').text 51 | title_parts = html_title.split(' - ') 52 | chapter_title = ' - '.join(title_parts[1:-1]) 53 | if len(title_parts) == 3: 54 | chapter_title = title_parts[1] 55 | # Extract the main text DIV content and turn it into a string 56 | contents = html.find('div', 'panel-default').find('div', 'fr-view') 57 | # Site dependant cleanup 58 | # Remove links to previous and next chapter 59 | nav_links = re.compile(r'[\s]*(Previous|Next) Chapter[\s]*') 60 | for link in contents.find_all('a', text=nav_links): 61 | link.decompose() 62 | for link in contents.find_all('p', text=nav_links): 63 | link.decompose() 64 | return(chapter_title, contents) 65 | 66 | 67 | def get_wuxiaworld_co(html): 68 | html_title = html.find('title').text 69 | chapter_title = html_title.split('_')[1].split(' - ')[0] 70 | # if len(title_parts) == 3: 71 | # chapter_title = title_parts[1] 72 | # Site dependant cleanup 73 | # Extract the main text DIV content and turn it into a string 74 | contents = html.find('div', {'id': 'section-list-wp'}) 75 | paragline = re.compile(r'.*</p><p>.*') 76 | for i in contents.find_all(text=paragline): 77 | istring = re.sub('</p><p>', '
', i)
78 | i.replaceWith(istring)
79 | credline = re.compile(r'Translator:.*Editor:.*')
80 | if contents.find(text=credline):
81 | contents.find(text=credline).replaceWith('')
82 | goto = re.compile(r'Please go to: http.* to read .* chapters for free.*')
83 | if contents.find(text=goto):
84 | contents.find(text=goto).replaceWith('')
85 | # Remove all scripts
86 | for script in contents.find_all('script'):
87 | script.decompose()
88 | return(chapter_title, contents)
89 |
90 |
91 | def get_syringe(html):
92 | html_title = html.find('title').text
93 | title_parts = html_title.split(' – ')
94 | chapter_title = ' - '.join(title_parts[0:-1])
95 | # Extract the main text DIV content and turn it into a string
96 | contents = html.find('div', 'entry-content')
97 | # Site dependant cleanup
98 | for i in contents.find_all('h6', 'has-background-color'):
99 | i.decompose()
100 | for i in contents.find_all('div', 'aligncenter wpcnt'):
101 | i.decompose()
102 | for i in contents.find_all('div', 'wpa'):
103 | i.decompose()
104 | for i in contents.find_all('script'):
105 | i.decompose()
106 | for i in contents.find_all('div', 'sharedaddy'):
107 | i.decompose()
108 | for i in contents.find_all('div', id=re.compile('^atatags-')):
109 | i.decompose()
110 | for i in contents.find_all('p', 'has-text-align-center'):
111 | i.decompose()
112 | credline = re.compile(r'.*stabbingwithasyringe.*')
113 | for i in contents.find_all(text=credline):
114 | i.replaceWith('')
115 | adultline = re.compile(r'This chapter contains.*18\+.*Be aware\.')
116 | for i in contents.find_all(text=adultline):
117 | i.replaceWith('')
118 | stabbing = re.compile(r'stabbing.*blog|translator.*site')
119 | for i in contents.find_all(text=stabbing):
120 | i.replaceWith('')
121 | return(chapter_title, contents)
122 |
123 |
124 | def clean_chapter_name(chapter_title):
125 | # Replace spaces with underscore
126 | chapter_file = chapter_title.replace(' ', '_') + '.xhtml'
127 | # Also replace non ascii "–" with "-"
128 | chapter_file = chapter_file.replace("–", "-")
129 | # Remove any remaining non-ascii character to avoid problems
130 | chapter_file = ''.join(c for c in chapter_file if c in VALID_CHARS)
131 | return chapter_file
132 |
133 |
134 | def get_chapter(url):
135 | print("Processing: " + url)
136 | html = gsweb.get_soup(url)
137 | if 'wuxiaworld.com' in url:
138 | chapter_title, contents = get_wuxiaworld_com(html)
139 | elif 'wuxiaworld.co' in url:
140 | chapter_title, contents = get_wuxiaworld_co(html)
141 | elif 'stabbingwithasyringe' in url:
142 | chapter_title, contents = get_syringe(html)
143 | else:
144 | raise SystemExit('Something went wrong! Unsuported server!')
145 | # Novel dependant cleanup
146 | try:
147 | print('Cleaning...')
148 | novel = __import__(novel_module)
149 | contents = novel.clean(contents)
150 | print('Clean')
151 | except ImportError:
152 | pass
153 | soup_str = "".join(map(str, contents))
154 | # Before turning the html into a soup, replace all weird chinese spaces
155 | # with actual spaces.
156 | soup_str = soup_str.replace(' ', ' ')
157 | # And replace double br tags with a paragraph break
158 | soup_str = re.sub(r'', '', soup_str)
159 | soup_str = re.sub(r'
[\t\n\r\f\v\s ]*
', '\n
', soup_str)
160 | soup_str = re.sub(r'
', '
', soup_str) 161 | 162 | print(chapter_title) 163 | chapter_file = clean_chapter_name(chapter_title) 164 | print(chapter_file) 165 | # Then turn the string back into a soup 166 | soup_text = BeautifulSoup(soup_str, 'lxml') 167 | # Remove all atributes from all tags 168 | for tag in soup_text.findAll(True): 169 | tag.attrs = {} 170 | # Remove empty paragraphs, including those which only contain br tags or 171 | # the weird space character (why the &·$% do you have a paragraph with 172 | # nothing?) 173 | for paragraph in soup_text.findAll(['span', 'p']): 174 | if not paragraph.text or paragraph.text in [' ', '。']: 175 | paragraph.decompose() 176 | # Remove stray br tags 177 | # for br_tag in soup_text.findAll('br'): 178 | # br_tag.decompose() 179 | # Turn the soup into text 180 | # text = str(soup_text) 181 | text = soup_text.prettify() 182 | 183 | # Undo some ridiculous censoring 184 | # text = damnit.sub('damn it', text) 185 | # text = damned.sub('damned', text) 186 | # text = fuck.sub('fuck', text) 187 | 188 | return chapter_title, chapter_file, text 189 | -------------------------------------------------------------------------------- /Novels/Complete/ancient.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright (C) 2017 GatoLoko 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | """ 22 | Created on 24/01/17 23 | 24 | @author: GatoLoko 25 | """ 26 | 27 | import re 28 | from common import Volume 29 | import gsweb 30 | 31 | volumes = {'1': Volume('1 - Divine strength awakens, mystery of Qing Shui\'s ' 32 | 'birth', 33 | 1, 115), 34 | '2': Volume('2 - Legend of Hundred Miles city, peerless and ' 35 | 'independent', 36 | 116, 160), 37 | '3': Volume('3 - The resplendent fireworks, the Mountains and ' 38 | 'Rivers like painting', 39 | 161, 243), 40 | '4': Volume('4 - Tears of a beauty destroying the kingdom, the ' 41 | 'twelve Portraits of Beauty', 42 | 244, 350), 43 | '5': Volume('5 - Greencloud continen of the Nine Continents, ' 44 | 'stepping into the Yan Clan', 45 | 351, 443), 46 | '6': Volume('6 - Aura of a King, sword pointing at the Dome of ' 47 | 'Heavens', 48 | 444, 508), 49 | '7': Volume('7 - Path of Martial Saint, heart of the strong', 50 | 509, 594), 51 | '8': Volume('8 - Through the flourishing Central Continent', 52 | 595, 744), 53 | '9': Volume('9 - Southern Vieweing Continent, hatred of the former' 54 | ' years', 55 | 745, 825), 56 | '10': Volume('10 - Eastern Victory Divine continent, exquisite' 57 | ' bell spirit', 58 | 826, 935), 59 | '11': Volume('11 - Storm in the Fifth Continent, the northern' 60 | ' Sacred Lu Continent', 61 | 936, 1060), 62 | '12': Volume('12 - Stepping on Lion King Ridge, trampling with such' 63 | ' force until the mountains and rivers crumble', 64 | 1061, 1133), 65 | '13': Volume('13 - Arriving at the Four Continents, Hundred' 66 | ' Dynasties, Hundred States. The path of a state' 67 | ' master', 68 | 1134, 1313), 69 | '14': Volume('14 - Soaring Dragon, dancing Phoenix, Haohan' 70 | ' continent', 71 | 1314, 1593), 72 | '15': Volume('15 - Demons & monsters dancing in riotous revelry,' 73 | ' beautiful women are like poetry', 74 | 1594, 1794), 75 | '16': Volume('16 - Oceanic Grand World, Legend of the Nine' 76 | ' Continents', 77 | 1795, 2493) 78 | } 79 | 80 | origin = 'http://www.wuxiaworld.co/Ancient-Strengthening-Technique/' 81 | author = 'I Am Superfluous (我是多余人)' 82 | cover_file = 'Covers/ancient-strengthening-technique.jpg' 83 | title = 'Ancient Strengthening Technique - Vol' 84 | 85 | synopsis_text = """ 86 | A human warrior cultivating the Ancient Strengthening Technique has 87 | transcended dimensions and arrived on Kyushu. Together with twelve ravishing 88 | beauties with looks that were unmatched in their generation, will he be able 89 | to stand on the summit of this world?
90 | 91 |This novel is about the main character, named Qing Shui, who transcended 92 | dimensions and arrived in the Kyushu continent. Storms of blood and wind, 93 | resulting in corpses and bones strewn about are extremely common here. The 94 | young warrior Qing Shui forged ahead in his path to cultivate, using 10 95 | years to train himself, only to seek vengeance for the one who had forsaken 96 | his mother! On the road, he had a chance encounter with the cold beauty (ice 97 | princess) Shi Qing Zhuang, incurring hatred and vengeance from her fiancée 98 | – Situ Bu Fan. After entering the Hundred Miles City, Qing Shui got 99 | acquainted with a dignified and beautiful lady named Yu He and other Xian 100 | Tian Realm cultivators – After which, he willingly invited tribulation on 101 | himself, after killing the young master of the Gong Yang Clan because of 102 | Yu He, and was forced into a corner. Luckily for Qing Shui, a lady as 103 | beautiful as a celestial maiden named Yi Ye Jian Ge rushed back to save him 104 | from afar, following which a bloody battle ensued. Can Qing Shui turn danger 105 | into safety, averting disaster? And his relationships with the various 106 | beautiful ladies, what will it develop into?
107 | 108 |Note from Author: I Am Superfluous
109 | 110 |To put it simply, this is a story about the rising up in ranks, and getting
111 | hot chicks along his journey to stand at the summit of this world.
112 | """
113 |
114 |
115 | def genlist(start, end):
116 | global origin
117 | list_page = gsweb.get_soup(origin)
118 | chapterlist = []
119 | for i in range(start, end+1):
120 | # print(i)
121 | if i in [29, 115, 342, 825, 1183, 1794]:
122 | continue
123 | elif i in range(1, 572+1):
124 | text = '^Chapter %s .*' % str(i)
125 | if i == 370:
126 | text = '^Chapter %s$' % str(i)
127 | elif i in [351, 353, 354]:
128 | text = '^Chapter %s - ' % str(i)
129 | elif i in [573, ]:
130 | text = '^AST: Chapter %s .*' % str(i)
131 | elif i in [584, 585, 586, 587, 588, 589, 605, 616]:
132 | text = '^AST: Chapter %s!$' % str(i)
133 | elif i in [590, 800, ]:
134 | text = '^chapter %s$' % str(i)
135 | elif i in [596, 598, 799, 1416] + list(range(1440, 2492+1)):
136 | text = '^AST %s ' % str(i)
137 | if i in [1797, 1957, 2281]:
138 | text = '^AST %s- ' % str(i)
139 | elif i == 2345:
140 | text = '^AST 2345 - Fifth .*'
141 | elif i == 2435:
142 | text = '^AST 2345 - Tyrannous .*'
143 | elif i in [2468, 2473]:
144 | text = '^Chapter %s - ' % str(i)
145 | elif i in [597, 600, 603, 606, 609, 610, 611, 613, 614, 615, 617,
146 | 619] + list(range(591, 595+1)) + list(range(623, 626+1)):
147 | text = '^Chapter %s$' % str(i)
148 | elif i in [599, 601, 602, 604, 607, 608, 621, 668, 670, 671, 672, 675,
149 | 676, 677, 679, 681, 682, 684, 685, 686, 687, 689, 691, ]:
150 | text = '^Chapter %s!' % str(i)
151 | elif i in [612, ]:
152 | text = '^Chapter %s .*' % str(i)
153 | elif i in [618, 620, 622, 627, 631, 633, 635, 639, 642, 645, 648, 650]:
154 | text = '^AST Chapter: %s!' % str(i)
155 | elif i in [654, 658, 661, 663, 666, 669, 674, 678, 680, 683, 688, 690,
156 | 693, ] + list(range(697, 798+1)) + \
157 | list(range(801, 1415+1)) + list(range(1417, 1436+1)):
158 | text = '^Chapter: %s$' % str(i)
159 | if i == 1184:
160 | text = '^1184$'
161 | elif i == 2493:
162 | text = '^Author.*'
163 | else:
164 | text = '^Chapter %s$' % str(i)
165 | link = list_page.find('a', text=re.compile(text))
166 | url = origin + link['href'].split('/')[-1]
167 | chapterlist.append(url)
168 | return chapterlist
169 |
170 |
171 | def clean(content):
172 | return content
173 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,