on iMacros website A question about image extraction by LOOP.

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
robotech
Posts: 10
Joined: Sun Dec 01, 2019 1:39 pm

on iMacros website A question about image extraction by LOOP.

Post by robotech » Mon Dec 02, 2019 6:17 pm

iMacros VERSION BUILD=8970419
OS:Windows10 64bit
BROWSER:Firefox 52.9.0
using.

Hello. iMacros beginner.

https://imacros.net/#prettyPhoto

On this iMacros web site firstLearn More
On the clicked page 6 images
It can be extracted by LOOP,
Next 2nd and 3rd Learn More
Unable to extract images with LOOP on the clicked page.
How should I write a macro?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: on iMacros website A question about image extraction by LOOP.

Post by chivracq » Tue Dec 03, 2019 1:55 am

robotech wrote:
Mon Dec 02, 2019 6:17 pm

Code: Select all

iMacros VERSION BUILD=8970419
OS:Windows10 64bit
BROWSER:Firefox 52.9.0
using.

Hello. iMacros beginner.

https://imacros.net/#prettyPhoto

On this iMacros web site firstLearn More
On the clicked page 6 images
It can be extracted by LOOP,
Next 2nd and 3rd Learn More
Unable to extract images with LOOP on the clicked page.
How should I write a macro?

"It can be extracted by LOOP,"
=> If you say so, interested to see your Script...! :idea:

"Unable to extract images with LOOP on the clicked page."
=> Can't help you if you don't post your Script...! :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
robotech
Posts: 10
Joined: Sun Dec 01, 2019 1:39 pm

Re: on iMacros website A question about image extraction by LOOP.

Post by robotech » Tue Dec 03, 2019 3:37 pm

・If it is 1, you can click on more details to extract 6 images with LOOP in order from the 1st, 2nd, 3rd page, but the number increases as the number of images increases, so that is not good.

TAG POS=2 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=3 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=4 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=5 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=6 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=7 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM

・If it is 2, you can click on more details to extract only one image by shifting one by one with LOOP in order from the first, second, third page.

TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM

・What I want to do is to click on the details and use LOOP to extract 6 images in order from page 1, 2 and 3, even if the number of images increases,
I want to keep the number of codes from increasing.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: on iMacros website A question about image extraction by LOOP.

Post by chivracq » Tue Dec 03, 2019 8:15 pm

robotech wrote:
Tue Dec 03, 2019 3:37 pm
・If it is 1, you can click on more details to extract 6 images with LOOP in order from the 1st, 2nd, 3rd page, but the number increases as the number of images increases, so that is not good.

Code: Select all

TAG POS=2 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=3 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=4 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=5 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=6 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS=7 TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
・If it is 2, you can click on more details to extract only one image by shifting one by one with LOOP in order from the first, second, third page.

Code: Select all

TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
・What I want to do is to click on the details and use LOOP to extract 6 images in order from page 1, 2 and 3, even if the number of images increases,
I want to keep the number of codes from increasing.

Hum..., Okay..., I'm still not "completely sure" I understand exactly what you want, as I don't really understand what "it" means in "If it is 1" + "If it is 2", but from your 1st Script, if you want to tag/locate all 6 Images, you could use stg like...:

Code: Select all

SET !LOOP 1

SET POS_Nb {{!LOOP}}

ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
'>
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
'>
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
'>
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
'>
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
'>
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
... And 'POS_Nb' will go through [2-7] in one same Script and just one Run... 8)
Is is what you mean/want...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
robotech
Posts: 10
Joined: Sun Dec 01, 2019 1:39 pm

Re: on iMacros website A question about image extraction by LOOP.

Post by robotech » Wed Dec 04, 2019 11:04 am

Six images can be extracted.
Last edited by robotech on Fri Dec 06, 2019 8:36 am, edited 2 times in total.
robotech
Posts: 10
Joined: Sun Dec 01, 2019 1:39 pm

Image extraction by LOOP on iMacros site

Post by robotech » Fri Dec 06, 2019 9:01 am

iMacros VERSION BUILD=8970419
OS:Windows10 64bit
BROWSER:Firefox 52.9.0
using.

Hello. iMacros beginner.

Click View More to open the first page and extract 6 images.
But,I clicked View More to open the second page,I clicked View More to open the third page,
why,Three images of the top page are extracted.

https://imacros.net/#prettyPhoto

And The 3rd page that you click on more details has 4 images, can you extract according to the number of images on the page like this?

https://imacros.net/overview/data-extraction/

SET !LOOP 1
SET POS_Nb {{!LOOP}}
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
ADD POS_Nb 1
TAG POS={{POS_Nb}} TYPE=IMG ATTR=SRC:* CONTENT=EVENT:SAVEITEM
Post Reply