Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

webtoons.com provider not fetching highest quality image by default #474

Open
rokibhasansagar opened this issue Dec 6, 2023 · 3 comments

Comments

@rokibhasansagar
Copy link

Enhancement Issue

By default, the provider webtoons fetches the images from data-url provided by them in the html file.

But they (Webtoons) have set to view compressed/optimized image (q90 JPEG Compression) instead of the original image.

The images fetched by browser as-well-as manga-py looks something like this: https://webtoon-phinf.pstatic.net/20200819_xx/abcxyz/1234567890.jpg?type=q90

If the trailing ?type=q90 from the link is removed, then the highest quality images can be retrieved.

For example: this image URL, https://webtoon-phinf.pstatic.net/20200819_66/1597775842101U59bL_JPEG/1597775842057215419.jpg?type=q90 is extracted from the html file, which returns compressed image (needs "Referer" header as https://www.webtoons.com). When the trailing ?type=q90 is removed from the URL and fetched, returns higher quality image.

@bumbaras
Copy link

AFAIK manga-py has no control over quality capability and doesn't add ?type=q90. So it should get 100% quality jpg by default.
Contrary, i didn't like this behaviour and add it into code to always get 90% jpg like on webpage. I don't see much differences between 90 and 100, and differences in file size is huge.
The less You can ask webtoons is 70% quality. This quality is used in android app of webtoons.
If it works differently now maybe webtoons changed something and puts 90% quality switch if it is not declared in request.

@rokibhasansagar
Copy link
Author

rokibhasansagar commented Jan 7, 2024

I don't know how to search and replace the ?type=q90 from the image link (if found) and implement the fix in manga-py.
So, I just wrote myself a bash script for webtoons.com to download them directly using awk, sed and curl. 😅

@bumbaras
Copy link

bumbaras commented Feb 8, 2024

Well, not with search and replace because You won't find in code anything to replace with this.
I think author should add "feature" flag but it seems he doesn't have much time these times. My little changes are real dirty and
it would be even shame to share them :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants