Download and save all pdf files from a web page

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
starnet
Posts: 1
Joined: Tue Mar 11, 2008 11:39 am

Download and save all pdf files from a web page

Post by starnet » Tue Mar 11, 2008 11:55 am

Hi all,

I'd like to write a macro that opens a web page and downloads and saves all pdf files found in that web page.
Somebody can help me?
Thanks a lot.
John S.
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Download and save all pdf files from a web page

Post by mknoll1 » Tue Mar 11, 2008 8:17 pm

Download Them All is the FF extension you are looking for. You just set it up to download the extensions you want downloaded them right click and it downloads all links with the desired extension.
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Download and save all pdf files from a web page

Post by Tech Support » Tue Mar 11, 2008 9:31 pm

This task is no problem for iMacros, too.

Please see this post with an example for MP3 downloads. It can be adapted for PDF downloads just by changing the extensions from *.mp3 to *.pdf.
bpb1000
Posts: 2
Joined: Wed Mar 12, 2008 4:13 am

Re: Download and save all pdf files from a web page

Post by bpb1000 » Thu Mar 13, 2008 2:58 am

Hi all,

Brilliant. This idea works fine (the same as MP3 downloads). Now I can download all pdf files form a web page. However, I’ve got a problem that the downloaded files with wrong icon. They don’t have .pdf extension and I have to add the .pdf extension for every file to be able to open it. The option that ''always use the selected program to open this kind of files'' is not available. This problem happens with this web site: http://www.sciencedirect.com.

Any help you can give me would be very much appreciated.
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Download and save all pdf files from a web page

Post by mknoll1 » Fri Mar 14, 2008 5:53 pm

It sounds like you are saving the files as "filename" instead of "filename.pdf" I assume that this script has an ONDOWNLOAD FILE= command. The file name needs to have an extension on it. If you need any more help on this just post the script and I can highlight the affected line.
bpb1000
Posts: 2
Joined: Wed Mar 12, 2008 4:13 am

Re: Download and save all pdf files from a web page

Post by bpb1000 » Sat Mar 15, 2008 1:38 am

Thank you very much. Here's the Macro script:

URL GOTO=http://
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:*.pdf

Also, I've got another problem with a web site. In this site, all pdf files have the same name: PDF. As a result I couldn't downlaod the pdf files with this macro. I changed CLICK MODE with no success.

Thanks.
drameet
Posts: 1
Joined: Sun Mar 23, 2008 6:19 pm

Re: Download and save all pdf files from a web page

Post by drameet » Sun Mar 23, 2008 6:46 pm

can u create a script for oxfordjournala? Here wen u click on the pdf link it opens in a browser so save target isnt applicable it dwnlds a empty explorer file
Post Reply