Skip to content

Commit

Permalink
- Bug fix and updated requirements
Browse files Browse the repository at this point in the history
- Fixed a bug where only a part of the novels were showing up in Read Light Novels, fixed by changing the parser to html5lib
- Included html5lib as a requirement
  • Loading branch information
EternalTrail authored May 8, 2020
1 parent 0ad410a commit df4d95f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion NovelParsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,13 +977,14 @@ def clearNovelCache(self):

def parseNovelList(self):

soup = PageTools.getSoupFromUrl(self.url+"novel-list")
soup = PageTools.getSoupFromUrl(self.url+"novel-list", parser="html5lib")
books = PageTools.getElementsFromSoup(soup,[{"class_":"col-lg-12"},{"class_":"list-by-word-body"},"li"])

for book in books:
if PageTools.getElementsFromSoup(book, ["a"])[0]['href'] == "#":
continue
linkTitle = PageTools.getElementsFromSoup(book, [{"data-toggle":"popover"}])[0]

self.novels[linkTitle.string] = [linkTitle['href'], PageTools.getElementsFromSoup(book, ["img"])[0]['src'], "N/A"]
self.novelSypnoses[linkTitle.string] = PageTools.getElementsFromSoup(book, [{"class_":"pop-summary"}], onlyText=True)[0]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ path/where/you/installed/python.exe novel2ebook.py
### Prerequisites

As mentioned before this script was written for Python version 3.7+.x. It may work with other versions too but none are tested.
Additionally the Python image library (Pillow), lxml, and BeautifulSoup4 are required.
Additionally the Python image library (Pillow), lxml, html5lib, and BeautifulSoup4 are required.
To install all dependencies just use the console to navigate into the project folder and write

```
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Pillow
beautifulsoup4
lxml
lxml
html5lib

0 comments on commit df4d95f

Please sign in to comment.