cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Complex URLs at once can't save file name

From: Rodrigo Zanatta Silva <rodrigozanattasilva_at_gmail.com>
Date: Tue, 14 Apr 2015 11:19:53 -0300

Another strategy is use the name direct in URL, so I have all the control I
want. Like, with my example, I will have

curl --url 'http://www.google.com/{various:first,complex:second,names:third}
<http://www.google.com/%7Bvarious,complex,names%7D>' --output 'name_#1.html'

So, the curl will download
*http://www.google.com/various <http://www.google.com/various>* and save in
*name_first.html*
*http://www.google.com/complex <http://www.google.com/complex>* and save in
*name_second.html*
*http://www.google.com/names <http://www.google.com/names>* and save in
*name_third.html*

This strategy is even more easy and will make everyone happy. Just use a
best character than ":" to separate the name. You know it better than me.

2015-04-14 11:10 GMT-03:00 Rodrigo Zanatta Silva <
rodrigozanattasilva_at_gmail.com>:

> Hello Daniel...
>
> I am really studying it and seeing: this is a common problem. No one know
> to solve it like I want.
>
> So, why not use the same strategy in --url with the --output? I can create:
>
> --output 'name[1-100].html'
> --output 'name{first,second,third}.html'
>
> So, the first URL to save, get the first name it generate and so on. I
> think the program don't have this syntax and this can be a new feature. I
> really love the program do all the threads things, not I. But with
> difficult to save the files, the things is really more complex.
>
> What about it? Your program have it or you will create it :D
>
> 2015-04-14 10:25 GMT-03:00 Rodrigo Zanatta Silva <
> rodrigozanattasilva_at_gmail.com>:
>
> HI all...
>>
>> I am using the bash cURL and I am having problem.
>>
>> I want to download various complex URLs at once, but I am having problem
>> with name. My command is something like:
>>
>> curl --url 'http://www.google.com/{various,complex,names}' --output
>> 'name#1.html'
>>
>> The problem is I can't save the file name with the various complex name I
>> send. So the program fail to write.
>>
>> Maybe I was be happy with:
>>
>> --output 'name%i.html'
>>
>> So I will create files:
>>
>> name1.html
>> name2.html
>> ...
>>
>> How can I solve this problem?
>>
>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-14