Skip to content

Commit

Permalink
Merge pull request #1933 from dipu-bd/dev
Browse files Browse the repository at this point in the history
Version 3.2.5
  • Loading branch information
dipu-bd authored Apr 9, 2023
2 parents 328fe6a + 636018b commit c07d0f8
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 340 deletions.
675 changes: 340 additions & 335 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lncrawl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.4
3.2.5
2 changes: 1 addition & 1 deletion lncrawl/binders/calibre.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def epub_to_calibre(app, epub_file, out_fmt):
"--authors",
app.crawler.novel_author,
'--comments',
app.crawler.synopsis,
app.crawler.novel_synopsis,
'--language',
app.crawler.language,
'--tags',
Expand Down
8 changes: 7 additions & 1 deletion lncrawl/core/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ def _fetch_content_image(app, url, image_file):
try:
img = app.crawler.download_image(url)
os.makedirs(os.path.dirname(image_file), exist_ok=True)
img.convert("RGB").save(image_file, "JPEG")
if img.mode not in ("L", "RGB", "YCbCr", "RGBX"):
if img.mode == "RGBa":
#RGBa -> RGB isn't supported so we go through RGBA first
img.convert("RGBA").convert("RGB")
else:
img = img.convert("RGB")
img.save(image_file, "JPEG", optimized=True)
logger.debug("Saved image: %s", image_file)
finally:
app.progress += 1
Expand Down
2 changes: 1 addition & 1 deletion sources/_index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sources/fr/lnmtlfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def read_novel_info(self):
soup.find("div", {"class": "summary_image"}).find("img").get("src")
)

self.synopsis = self.cleaner.extract_contents(soup.find("div", {"class": "summary__content"}).find("p"))
self.novel_synopsis = self.cleaner.extract_contents(soup.find("div", {"class": "summary__content"}).find("p"))
self.language = "fr"

self.novel_author = ", ".join(
Expand Down

0 comments on commit c07d0f8

Please sign in to comment.