dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
719 stars 136 forks source link

Blogspot Image Resolutions #363

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello. While generating an EPUB from blogspot, I noticed that WebToEpub does not fetch the highest resolutions images. I'll illustrate the issue with the url I was working on. The example is NSFW Base URL:https://erolns.blogspot.com/2019/02/novel-introduction-adolescent-adam-8.html Cover selected:https://4.bp.blogspot.com/-TGXsOjoQQpQ/XGDse2CvCeI/AAAAAAAACmk/lfAGhIRbSRoTlGXlUq7oSdo4oLyQv34pgCLcBGAs/s640/ADAM_8_page_001.jpg URL of the image selected as cover on page (Higher Resolution:https://4.bp.blogspot.com/-TGXsOjoQQpQ/XGDse2CvCeI/AAAAAAAACmk/lfAGhIRbSRoTlGXlUq7oSdo4oLyQv34pgCLcBGAs/s1600/ADAM_8_page_001.jpg Highest Resolution:https://4.bp.blogspot.com/-TGXsOjoQQpQ/XGDse2CvCeI/AAAAAAAACmk/lfAGhIRbSRoTlGXlUq7oSdo4oLyQv34pgCLcBGAs/s0/ADAM_8_page_001.jpg

The urls with s0 in them seem to be the original resolution. I noticed the above with Imagus

dteviot commented 4 years ago

@Cupbox Thank you for this.

Interesting. The /s540 and /s1600 image URLs are the only ones in the HTML for the page. I don't know where Imagus is getting the URL of the original image from. Unfortunately, I can't seem to find unminified source for imagus.

I hypothesize that /s0 is a magic number that says "return original". https://sneeit.com/using-blogger-blogspot-image-url-structure-for-cropping-and-resizing/ suggests that the /s element indicates size of image. So, /s0 presumably indicates original size.

ghost commented 4 years ago

Thanks a lot @dteviot It seems the cover is still fetching the LQ version. Is this intended behaviour?

dteviot commented 4 years ago

@Cupbox

D'oh!, missed that.

dteviot commented 4 years ago

@Cupbox

Fixed. Note, I haven;t updated version in Firefox or Chrome stores yet.

ghost commented 4 years ago

Thanks!

dteviot commented 4 years ago

@Cupbox Updated version (0.0.0.115) has been submitted to Chrome and Firefox stores. Firefox store has new version available. Chrome will be a few days (probably) to finish review.