RedSquirrel87 / manga-downloader

A very simple application written in JAVA to download any chapters of any manga from the supported websites
31 stars 1 forks source link

Pages preview #117

Open RedSquirrel87 opened 5 years ago

RedSquirrel87 commented 5 years ago

Original report by Anonymous.


Hello. Have you ever considered adding a "pages preview" feauture in the download windows? For example, it would be good if a miniature of each page were shown while you're downloading it; that would prevent the user from wasting time when the chapters have got wrong pages or have got "bait" pages (this happens a lot with aggregators, because they use "Come back soon" pages for making people believe the new chapters are already out). Sure, you can find out about this things after downloading the chapters, but if you downloading a lot of chapters you could waste hours downloading wrong chapters. Thank you for your efforts!

RedSquirrel87 commented 5 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Since this is not an online tool to show the image preview the program needs indeed to download the image file itself. This means that to download and show you a preview of all the images in the chapter the program would take the exact same amount of time it takes to download the entire chapter, there would be no big advantage xD

RedSquirrel87 commented 5 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


However, I’ll see what I can do for next versions, maybe a similar optional function can be useful to someone :thumbsup:

RedSquirrel87 commented 4 years ago

Original comment by vilejog (Bitbucket: vilejog, ).


You don’t need the actual images for showing a preview, you can use this: https://images.weserv.nl/. It can grab the images and offer a down-scaled (i.e. faster to download) version of them. It’s what Tachiyomi uses for its reading experience (for downloads, it uses the actual images).

RedSquirrel87 commented 4 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Interesting, but some images need specific referer header or cookies to access them even via web (otherwise they return 403 error with the direct URL), does that service provide support for these things?

RedSquirrel87 commented 4 years ago

Original comment by vilejog (Bitbucket: vilejog, ).


I guess it does. If I’m not wrong (check their documentation for being 100% sure), they make requests 1:1 to yours, so the headers should be the same too. Not sure about the cookies though

RedSquirrel87 commented 4 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


So it will reuse the same headers I use when calling their URL? If so it would be perfect, I'll give it a try tomorrow

RedSquirrel87 commented 4 years ago

Original comment by vilejog (Bitbucket: vilejog, ).


It should use at least compatible headers. It must work with all devices alike (that’s what they say), so I don’t think it’s got a standard header for every site. Or maybe they use a header which is recognized and allowed by most of the sites. They’re a Cloudflare’s affiliate, they’re bound to have very sharp techniques

RedSquirrel87 commented 4 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Just tried, it does not seem to work unfortunatly. For example this image from LoveHeaven https://s2.imgmirror.club/images/20191103/2ea5cfae6690045eb04abf83e792598e290.jpg returns Access Denied error without using the chapter’s web page link as referer, but also sending a request to "http://images.weserv.nl/?url=https://s2.imgmirror.club/images/20191103/2ea5cfae6690045eb04abf83e792598e290.jpg using the referer header simply returns 404 error (because the service can not access the image).

I also took a look at the documentation but the only params you can pass are for image manipulations (width, height, resize, fit, etc…), so it does not seem to be a way to bypass this issue

RedSquirrel87 commented 4 years ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


I found that there is an open issue about similar cases on their github: https://github.com/weserv/images/issues/177

So it’s confirmed that it does not work for now :frowning2: