How Save only the URL of a visited page

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
att
Posts: 24
Joined: Tue Aug 19, 2008 2:22 pm

How Save only the URL of a visited page

Post by att » Tue Aug 19, 2008 2:47 pm

Hi all,
This is a very nice tool. Been reading, couldn't find the answer to the below.

SET !ERRORIGNORE YES
SET !DATASOURCE sites.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO={{!COL1}}
PAUSE

Is there a way to write the already visited URL to an output file (for example visited_sites.csv) ?
I just need to save the visited URL !, I am using FF, on a Fedora box.
Thanks for any help.
ATT
How to configure Cisco Routers
www.ittrainingexpert.info
BrianR
Posts: 126
Joined: Wed Jun 11, 2008 4:13 pm

Re: How Save only the URL of a visited page

Post by BrianR » Tue Aug 19, 2008 2:49 pm

SET !EXTRACTADD {{!URLCURRENT}}
att
Posts: 24
Joined: Tue Aug 19, 2008 2:22 pm

Re: How Save only the URL of a visited page

Post by att » Tue Aug 19, 2008 3:10 pm

Thanks very much Brian,
How would I go about writing this to a .csv ?
I've tried
SAVEAS TYPE=MHT FOLDER=/root/Desktop/imacro FILE=+{{!NOW:ddmmyyyy}}
SAVEAS TYPE=MHT FOLDER=/root/Desktop/imacro FILE=homepage_current
SAVEAS TYPE=HTM FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}

none of them seem to work !.
Thanks for your help
ATT
How to configure Cisco Routers
www.ittrainingexpert.info
BrianR
Posts: 126
Joined: Wed Jun 11, 2008 4:13 pm

Re: How Save only the URL of a visited page

Post by BrianR » Tue Aug 19, 2008 3:17 pm

SAVEAS TYPE=EXTRACT FOLDER=c:\ FILE=URL.CSV

This will save the information saved with "SET !EXTRACTADD {{!URLCURRENT}}" into the file C:\URL.csv.

Hope this helps.

Brian
att
Posts: 24
Joined: Tue Aug 19, 2008 2:22 pm

Re: How Save only the URL of a visited page

Post by att » Tue Aug 19, 2008 3:38 pm

Thanks very much Brian,
It's the perfect solution, I thought “SAVEAS TYPE=EXTRACT” would write a lot of information !
This is perfect.
Thanks.
ATT
How to configure Cisco Routers
www.ittrainingexpert.info
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: How Save only the URL of a visited page

Post by Tech Support » Tue Oct 28, 2008 1:36 pm

Note: Instead of
SET !EXTRACTADD {{!URLCURRENT}}

please use

ADD !EXTRACT {{!URLCURRENT}}.

This does exactly the same, but the EXTRACTADD command is deprecated and should be avoided for new macros.
marco89thebest
Posts: 10
Joined: Sat Jan 11, 2014 10:06 pm

Re: How Save only the URL of a visited page

Post by marco89thebest » Fri Jan 17, 2014 6:45 am

If I link to add more than one link in a CSV file?

I have to add more link in the same file in a column. Is possibile to do something like this?

EDIT: It works and I didn't touch anything! :)
Post Reply