cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: python -> curl -> download all files

From: Lukasz Szybalski <szybalski_at_gmail.com>
Date: Tue, 22 Jul 2008 14:55:47 -0500

On Fri, Jul 11, 2008 at 10:43 AM, Ralph Mitchell
<ralphmitchell_at_gmail.com> wrote:
> On Fri, Jul 11, 2008 at 10:30 AM, Lukasz Szybalski <szybalski_at_gmail.com>
> wrote:
>>
>> Hello,
>> I was wondering if anybody has a python script to download files using
>> curl.
>>
>> I saw there was a perl scrip but if any of you has it in python that
>> would be great. I could then import it from my app.
>>
>> Ideas, links?
>
> You could start here:
>
> http://pycurl.sourceforge.net/
>

Since I wasn't able to get an example on how to do files in pycurl,
here is the sh script:

"""
for i in `curl -E certkey.pem -k -s -u user:pass
ftp://www.somesite.com/ --ftp-ssl --list-only`;
do `curl -E certkey.pem -k -s -B -O -u user:pass
ftp://www.somesite.com/$i --ftp-ssl`;mv $i ../download/$(date
+%Y%m%d)_$i ;done
"""

Thanks,
Lucas
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-22