Making a list of URL's from product SKU's

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
pinktoes
Posts: 3
Joined: Thu Oct 20, 2011 12:52 am

Making a list of URL's from product SKU's

Post by pinktoes » Thu Oct 20, 2011 2:36 am

Hi

I have ran a number of searches on the forums but everyone seems to be doing something just slightly different. :?

I have a list of product skus (about 200) and I am trying to get the actual URL that is associated with each product in a list format. I got it to work with one but I seem to be having an issue understanding the "move to next one in the list" logic.

Basically what my macro needs to do is:

1. Go to the website
2. Enter the SKU into the product search box
3. Click through to the product page
4. Record the URL
5. Repeat 200 times (once for each product SKU)

This is the macro I have so far:

VERSION BUILD=7401004 RECORDER=FX
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.ATT.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:SearchForaQuestion CONTENT=
SET !DATASOURCE C:\xxx\skus.txt
TAG POS=1 TYPE=BUTTON ATTR=ID:search-search
TAG POS=1 TYPE=SPAN ATTR=TXT:View<SP>phone<SP>details
ADD !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\xxx\Desktop FILE=URLLIST.CSV

If anybody could help me I would REALLY appreciate it!! :mrgreen:
~Lori
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Making a list of URL's from product SKU's

Post by Daniel, Tech Support » Thu Oct 20, 2011 4:37 pm

Hi,

I can't be very specific without the real url, but in general I would suggest extracting the urls of the links instead of actually following the links and extracting the current url.
See this wiki article for more info. You could then play the macro in a loop and use {{!LOOP}} variable and relative positioning to get each link's url.

If you provide me with the real url, I could come up with something more specific.

Best regards,
Daniel, iOpus Support
pinktoes
Posts: 3
Joined: Thu Oct 20, 2011 12:52 am

Re: Making a list of URL's from product SKU's

Post by pinktoes » Fri Oct 21, 2011 7:55 pm

Thank you so much Daniel! :D :D

I have one more question I'm hoping you can help:

I need to "grab" the Meta Keywords from pages. Below is what I have that seems to almost work.

TAG POS=1 TYPE=META:description ATTR=CONTENT:* EXTRACT=TXT

But it only returns a value of: #EANF#

:?

Any help is really appreciated!
~Lori
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Making a list of URL's from product SKU's

Post by Daniel, Tech Support » Mon Oct 24, 2011 5:50 pm

Hi,

I guess the SEARCH command would be the easiest option. E.g.

Code: Select all

SEARCH SOURCE=REGEXP:"meta.*content=\"(.*)\"" IGNORE_CASE=YES EXTRACT="$1"
PROMPT {{!EXTRACT}}
Best regards,
Daniel, iOpus Support
Post Reply