belaviyo / save-images

Save loaded images in nested iframe pages
https://webextension.org/listing/save-images.html
254 stars 61 forks source link

Handle "Continue To Image" Button/Link in LEVEL-2 Page To Goto Level-3 Page & DnLd Img From Level-3 #49

Open atErik opened 3 years ago

atErik commented 3 years ago

Hi, Thanks for this wonderful project.
Please add a feature to handle "Continue To Image" button/link (shown in Level-2/Page-2), that appears after click on a small-image in various forums (Level-1/Page-1) . And actual/final image is shown in webpage (Level-3/Page3), which appears after click on the "Continue To Image" button/link.

MORE INFO / PROBLEMS / ISSUES:

In a forum for-example: "forum.example1.com", an uploader user has posted many small-images from "example2.com", an image-hosting type of website. For example, posted 30 image links, each link has such URL "example2.com/i/img-numbers". Forum's this page (PAGE-1 or LEVEL-1) also showing other images from forum and also shows Ads (Advertisements), etc.
I only want to download images that are posted by one specific uploader/user in a specific post under a specific topic in forum.
When i looked at source-code of forum-webpage using Firefox/Chrome/Chromium-inspector, then it revealed, specific post has specific URL, & are inside specific HTML tags with specific "ID" attribute, (that is, some specific HTML-tag with specific ID-name, that has different post number for different post, etc).
once/when viewer user clicks/taps/presses on a specific single small-image in forum's post,
then next webpage (PAGE-2 or LEVEL-2) from "example2.com" site appears, and it does not show the image first, but instead, shows a Button or a Link with "Continue To Image" (or something similar) text, this Page-2 also has other small-images and Ads . Website that shows button usually has specific HTML-tag with ID-attribute such as this example-code: ...<form action="" method="POST"><input id="continueButton" type="submit" name="imgContinue" value="Continue to image..."></form>..., etc.
Some website shows a link (instead of a button ) that has "Continue To Image" text . When user clicks on it, it either un-hiddens the final-image on Page-2, OR goes into PAGE-3 to show the final image.
after pressing/clicking/tapping on the "Continue To Image" (or similar) button or link, when next webpage (PAGE-3 or LEVEL-3) appears from "example2.com" site, they such webpage usually or may have such (example) URL: "example2.com/u/u-number/i/img-number", etc, where the final image is shown in middle, in middle of other small-images from example2.com site, and this page also has Ads, etc.
viewer/user have to right-click on the middle final specific IMAGE (or tap & hold on mobile browser) to reach/bring the Properties menu & select "Save image as" option there, then file-browser window appears to save it into specific folder, etc.

DYNAMIC/VARIABLE RESPONSE FROM IMAGE SERVER:
i have also also noticed that, this "example2.com" website shows the "Continue To Image" button or link, when a viewer user wants to see image for 1st time, that means, when viewer user clicks 2nd-time on another small-image shown on forum "example1.com" website, then this PAGE-2 does not appear or auto SKIPPED or goes away quickly.
When viewer user pauses, for example, for 30 minutes or 1hr, and if viewer user clicks on forum's another/same small-image, then "example2.com" site AGAIN asks to click on that "Continue to Image" button/link.

Above situation/web-interface exists in many websites not only in one "example2.com" website.

How can i pre-program this addon to download all the final specific image in PAGE-3 or LEVEL-3, when "Continue To Image" button is shown (in Page-2 or in Level-2) initially ?
And, How can i pre-program this addon to download all the final specific image in PAGE-3 or LEVEL-3, when "Continue To Image" link is shown (in Page-2 or in Level-2) initially ?
And, How can i pre-program this addon to download all the final specific image in PAGE-2, when "Continue To Image" button/link un-hiddens the final image initially ?
Why i have used the word "initially" its exaplained in previous/above section : this "Continue To Image" button or link appears only initially for the first image, and after a pause of activities for 30-to-60 minutes, etc.

And also want to set timers, like these : after downloading (final) image in page-2 or page-3, there should be atleast 5-to-10 seconds of waiting time (before begin with next small-image in the forum's specific post in PAGE-1 or LEVEL-1 ) . Note: due to large & random sized image file, limited server capacity, etc, downloading final image will take widely different time.
And, before handing the "Continue To Image" (or similar text based) button or link, there should be also atleast 4 seconds of waiting time/period, etc.

if automated download has timers for sufficient delays before (or in-between) various activities, then it reduces pressure on image hosting type of server(s).