How to handle "save link as" links and download automatically

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Imkas
Posts: 1
Joined: Sat May 04, 2019 2:28 pm

How to handle "save link as" links and download automatically

Post by Imkas » Sat May 04, 2019 2:41 pm

Hello to all,

I'm new to coding in iMacros. Maybe someone could help me.

I want to download several files from a website, but to download each file manually I need to do "rigth click" over an icon then "Save link as" and select a folder and click "Ok"

I tried recording my steps but the "save link as", folder selection and click "ok" weren't recorded.

If I save the HTML code of the website I see that the visible links that request me to "Save link as" are like this:

Code: Select all

http://website.com/ab/cd/kpppwo/file_xyz.mp3
When I go manually in browser to http://website.com/ab/cd/kpppwo/file_xyz.mp3 it opens a new tab with a very long URL and appears a small player and an option to download it. If I put this long URL in browser the file is downloaded.

So, having the short links (from HTML code of website), how can I get the long URL for each short URL and save the long URLs in a csv file. Or how to download directly with a iMacro code from website automating the save as process?

Many thanks for any help.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to handle "save link as" links and download automatically

Post by chivracq » Mon May 06, 2019 8:52 pm

Imkas wrote:
Sat May 04, 2019 2:41 pm
Hello to all,

I'm new to coding in iMacros. Maybe someone could help me.

I want to download several files from a website, but to download each file manually I need to do "rigth click" over an icon then "Save link as" and select a folder and click "Ok"

I tried recording my steps but the "save link as", folder selection and click "ok" weren't recorded.

If I save the HTML code of the website I see that the visible links that request me to "Save link as" are like this:

Code: Select all

http://website.com/ab/cd/kpppwo/file_xyz.mp3
When I go manually in browser to http://website.com/ab/cd/kpppwo/file_xyz.mp3 it opens a new tab with a very long URL and appears a small player and an option to download it. If I put this long URL in browser the file is downloaded.

So, having the short links (from HTML code of website), how can I get the long URL for each short URL and save the long URLs in a csv file. Or how to download directly with a iMacro code from website automating the save as process?

Many thanks for any help.
Yeah..., I saw you were checking the Forum a few times, but hum, it would have "helped" if you had taken a few Seconds to read the Forum Rules on how to use the Forum "a bit correctly"...:
1- Question Mark missing in your Thread Title, you are asking a Qt and not sharing a 'How-To'...

2- CIM...! :mrgreen: (Read my Sig...)

3- You've opened your Thread in the 'iMacros for FF' Sub-Forum, meaning your Qt/Pb is specific to FF and/or iMacros for FF only... But FCI not mentioned and you don't mention in which other FCI's your Script works..., or if you are using a '.js' Script... :roll:
(And if you only kind of "randomly" selected this Sub-Forum, no need to duplicate now, but try to select the "correct" Sub-Forum next time...)

4- No script posted, no URL, not much we can do to help you with as only "Info" some "website.com" (very useful, ah-ah...! :roll: ) + "some short then long URL to download some '.mp3'"...
Tja...!, this is a Technical Forum, you need to give a bit more concrete Info...! And we need a Script and some URL to be able to do any Testing... :idea:

>>>

5- But OK, did you try 'EVENT:SAVETARGETAS' with the 'CONTENT' Parameter on those Links...?

6- And/or, an 'EXTRACT=HREF' on your Link...?, + open that Link in a 2nd 'TAB' with 'URL GOTO'...? (+ Maybe re-extract the long URL with '!URLCURRENT' to re-load that Page directly with 'URL GOTO' again where you might be able to interact directly with the 'Download' Functionality from the Player on that Page itself...?)

But tja, difficult to give you some "Ideas" based on the scarce and vague Info you've provided... :|
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply