Multiple Page extractions (like google results)

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
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
Alexander

Multiple Page extractions (like google results)

Post by Alexander » Sun Dec 04, 2005 8:02 pm

I find myself doing this often is where i need to extract multiple things on a generated page from google for example (top 30 results) across multiple pages, or articles from a website but im struggling to figure out how to do this with a macro.

Here is what I tried to record : (using trial)

Code: Select all


VERSION BUILD=5010115     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.ezinearticles.com/?cat=Business:Sales    

'Comment: the url above would change after the next button is clicked - read below towards the bottom (so would i replace the url with *?)loop this next bottom part till the page is done   
 
SIZE X=1072 Y=713    

'Comment: click the link here below (but links change so do i replace that part with *)   

TAG POS=1 TYPE=A ATTR=TXT:Are<SP>Long-winded<SP>Sales<SP>Letters<SP>Still<SP>Effective?   
TAG POS=1 TYPE=FONT ATTR=TXT:Are<SP>Long-winded<SP>Sales<SP>Letters<SP>Still<SP>Effective?<BR><LF>By<SP>Robin<SP>Henry<SP>   

'Comment: extract a certain field from that page like author, title, word count, etc   

EXTRACT POS=1 TYPE=TXT ATTR=<FONT<SP>class=art_title>*   

'Comment: go back to the main page with all the results

BACK    

'Comment: loop the above until its all done for that page

'Comment: continue to next page and do the same thing until you can NOT find a next page   
  
TAG POS=1 TYPE=A ATTR=TXT:Next<SP>30   
'Comment: New page loaded      

Im not sure how to modify that to make it work, i tried the tutorials and many other things, but the tutorials just give basic overview more to sell the product and dont show you how to do the repetitive page tasks moving from link to link (where as i found how to move link to link using a CVS file)

If someone could pitch in their two cents on this that would be great. Thanks
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Mon Dec 05, 2005 3:51 pm

Please have a look at our Google search engine extraction example at http://forum.imacros.net/viewtopic.php?t=6

Basically this example does a line by line extraction of the Google search results. The basic structure of this code can be used for any other result extraction as well, for example for use with http://www.ezinearticles.com
Post Reply