Q UPDATE - multiple loops

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Q UPDATE - multiple loops

by hartflooring1 on Fri Aug 16, 2013 1:33 pm

**EDIT** - The previous question was not understood.
So I formulated my question differently, as I am still looking to resolve my issue with iMacros looping.

In iMacros I would like to have multiple loops.
    - First loop: Loops all rows in Excels
    - Second loop: Grab all the List elements found on the website ( per Excel row).

After a lot of work I feel I am finally getting somewhere.
The problem in the script is that I cannot get Loop {{n}} to grab all the positions of the page (list items).
Any help would be highly appreciated.

Code: Select all
var macro;
    macro =  "CODE:";
    macro +=  "VERSION BUILD=000000" + "\n";
    macro +=  "TAB T=1" + "\n";
    macro +=  "SET !ERRORIGNORE YES" + "\n";
    macro +=  "SET !EXTRACT_TEST_POPUP NO" + "\n";
    macro +=  "SET !DATASOURCE source.csv" + "\n";
    macro +=  "SET !DATASOURCE_COLUMNS 1 " + "\n";
    macro +=  "SET !LOOP 1" + "\n";
    //macro +=  "SET !TIMEOUT 3" + "\n";
    macro +=  "SET !DATASOURCE_LINE {{i}}" + "\n";
    macro +=  "URL GOTO=http://site.com/?what={{!COL1}} " + "\n";
    macro +=  "TAG POS={{n}} TYPE=LI ATTR=CLASS:classofdiv" + "\n";
    macro +=  "TAG POS={{n}} TYPE=SPAN ATTR=TXT:* EXTRACT=TXT" + "\n";
    macro +=  "SAVEAS TYPE=EXTRACT FOLDER=* FILE=All_list_items.txt" + "\n";

    for (var i=1;i<20;i++)
    {
    iimSet("i",i)
    iimPlay(macro)
    iimSet("n",i)//<-- How to grab all the TAG POS of the website?
    }
hartflooring1
 
Posts: 1
Joined: Fri Aug 16, 2013 1:05 pm

Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 2 guests

cron
-->