Looping through A to Z

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.

Looping through A to Z

by Guest1 on Sun Nov 20, 2005 11:53 pm

The start page of a website which I would like to download info from look like this:

a b c d e f g h i j k l m
n o p q r s t u v w x y z

record1
record2
record3

What I would like to do is to have a set of macros that can go to the start page, select the page ("a" for example), click on record1, save the page, go back to record2 and do the same steps for the rest of the records and pages. Each of these alphabetised pages do not have any "back" button to bring you back to the index page nor do the individual records. So, I'll have to go back to the start page all the time to select the page to go to next.

The steps to be covered by my macros would look something like this...

Macro1: Go to start page, Click on page "a", retrieve the page.
Macro2: Loop through the records by clicking on each individual record and save the resultant page.
Macro1: Replayed to go to start page, Select page (this time page "b"), retrieve the details
Macro2 is repeated and so forth.

While I've no problem getting macro2 to loop through the records with a page, what should be in macro1 to enable it to loop through a to z? Using {{!LOOP}} allows me to loop through a to z provided that macro1 is played coninuously. Once macro2 is scripted to follow macro1 before reverting back to macro1, the {!LOOP}} in macro1 no longer seems to be able identify that the next page is "b" and so forth.

The urls of the start page reads: http://asp.abc.com/index.asp?codename=A and the subsequent page is http://asp.abc.com/index.asp?codename=B

If the pages are numbered, I could still use the scripting example with variables and cstr(m) to handle the iterations to turn the page. But, when it is alphabetised and each page has its own unique url e.g. http://asp.abc.com.sg/index.asp?codename=A, how do I go about scripting this?

Hope this isn't too wordy and confusing. Thanks for your help.
Guest1
 

by Tech Support on Mon Nov 21, 2005 2:05 pm

Please see our Google Search Example (with source code) at http://forum.iopus.com/viewtopic.php?t=6

I think the same approach works well in your case.
Ann
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

by Guest1 on Mon Nov 21, 2005 8:02 pm

Thanks! I'll take a look at it.
Guest1
 


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 6 guests

-->