A total Newbie to iMacros and looking for some help from a more experienced user.
I have a problem with the negative relative extraction on eBay.com
Windows XP SP2
iMacros v6.2
Office 2003 - Using Excel VBA to control the iMacros Browser
I was trying to extract data from the ebay.com website. The listings are in batches of 50. I can extract the first 49 items and then it fails on the 50th. I have tried displaying 100 auctions to a page and it extracts the first 99 items and fails on the 100th - - the 50th items extracts OK in this instance. I have looked at the source of the eBay page and can see no difference in the formatting of the last item on each page.
To replicate, goto http://www.ebay.com and search for 'toner' (for example) -- at the time of writing there are 24,000+ items for 'toner' split over multiple pages. I have created a sample macro which demonstrates the problem. It extracts items 1, 2, 49, and 50 (note: In my VBA code, I use a loop and pass a variable called Pos to iMacro, change the page and then repeat the process). The logic I use is to find the time left on the page and then using negative relative positioning to extract the link which conforms to the following syntax - http://cgi.ebay.com/*.
Once you have navigated to the search results, run the simple macro below from within the browser.
Code: Select all
TAG POS=1 TYPE=SPAN ATTR=CLASS:time*
TAG POS=R-1 TYPE=A ATTR=TXT:*&&HREF:http://cgi.ebay.com/* EXTRACT=HREF
TAG POS=2 TYPE=SPAN ATTR=CLASS:time*
TAG POS=R-1 TYPE=A ATTR=TXT:*&&HREF:http://cgi.ebay.com/* EXTRACT=HREF
TAG POS=49 TYPE=SPAN ATTR=CLASS:time*
TAG POS=R-1 TYPE=A ATTR=TXT:*&&HREF:http://cgi.ebay.com/* EXTRACT=HREF
TAG POS=50 TYPE=SPAN ATTR=CLASS:time*
TAG POS=R-1 TYPE=A ATTR=TXT:*&&HREF:http://cgi.ebay.com/* EXTRACT=HREF
Any suggestions. I doubt it is a bug with iMacros, but any pointers on my code to do the extract would be appreciated.
Cheers
Steve