Page 1 of 1

Download image from a link with no extension

Posted: 17 Aug 2017, 16:15
by jabbafat
I have several thousand links that have no extension but do contain a jpg file when opened using a browser.
Here is an example:
https://system.netsuite.com/core/media/ ... d2fac4fae2
How do I set the 'Target Files' so that EPF picks up the image from these links please?

Re: Download image from a link with no extension

Posted: 17 Aug 2017, 20:23
by Maksym
Well, generally speaking, if you want EPF to save files without extension you set the target files like this:

*.

But in this case you can use

*.jpg

as EPF will know that this file is a JPEG by response headers. So in your project you can use the "Current page only" exploration method and any of the above target files.

Re: Download image from a link with no extension

Posted: 18 Aug 2017, 12:32
by jabbafat
Thanks Maxim,
I tried all of those to no avail I'm afraid.
Is there anything else I can try please?

Re: Download image from a link with no extension

Posted: 18 Aug 2017, 17:09
by Maksym
OK, first of all - make sure you have the most recent version of the program:

http://www.webimagedownloader.com/download/

Here is the project I created using the instructions I provided above with a single URL that you gave. Please try it:

system.eu2.netsuite.com-1-file.epr

(use right-click menu item "Save link as...", then run downloaded file to open the project in EPF)

If it works - add the rest of your URLs to this project. If it doesn't - tell me what does it say in the download log.

Re: Download image from a link with no extension

Posted: 18 Aug 2017, 17:54
by jabbafat
Thanks Maxim,

Yes, yours works fine. But when I put the full list in it only downloads 1 image (the one from your example). I will have a look to see what is causing that. I will repost on Monday with the answer.

Thanks again for the help.

Re: Download image from a link with no extension

Posted: 21 Aug 2017, 12:40
by jabbafat
Ok I see the problem now. It works with just the starting addresses. But I hadn't mentioned in the previous post that I was appending the address in a similar fashion to how we did in a previous post viewtopic.php?f=4&t=7107&p=8034#p8034 which renames the images as they arrive.
I'm wondering if this is because the starting address already has a "?" in it.

So https://system.netsuite.com/core/media/ ... d2fac4fae2 works fine as a starting address

But https://system.netsuite.com/core/media/ ... em=Product does not work for me.
We use this setup regularly so we know it generally works. I've done all the normal stuff of ticking "Use value of this parameter for file name" and used "item" in the box as normal etc.

Re: Download image from a link with no extension

Posted: 21 Aug 2017, 14:46
by Maksym
If URL already contains parameters after "?", then new parameters are added with "&", not with another "?". Like this:

/media/media.nl?id=107388&c=590499&h=88e7534a8ad2fac4fae2&item=Product

In this case the "Use value of the following parameter for file name" should work just fine.

Re: Download image from a link with no extension

Posted: 21 Aug 2017, 15:24
by jabbafat
Yes, that's done it. It works fine now.

Thanks for your help once again Maxim.