curl-library
Re: Interested in remote-scripting SourceForge
Date: Tue, 6 Aug 2002 04:47:24 -0400
Daniel Stenberg <daniel_at_haxx.se>:
> Not that I know of. I once wrote a quick hack that automaticly exports
> project info from sourceforge that possibly could be used as a base for
> further explorations:
>
> http://advogato.org/person/bagder/diary.html?start=149
Hm. That does not quite seem to work. When I fill in my name/password/group-id
for the SNG project (id 1012) I get this back:
snark:~/WWW/forgetool$ more export.xml
<?xml version='1.0' encoding='ISO-8859-1'?>
<project_export>
You are not an admin of this project. Permission denied.
Would you please test this method on a project where you're the admin?
I'm curious to know whether it's globally broken or whether (more likely)
there's some fooup in my user data on SF.
> > 2. If not, can I get some expert help on the steps needed to establish
> > an https: session via curl? I could take it from there.
>
> I think that script of mine works in regard of logging in and peforming
> operations. It logs in and stores the received cookies in a file for the
> following requests. You just need to tweak the "following requests" bit.
Right, I understand in principle. One curious thing, though. When I run
the script with verbose on, it says:
curl: (1) libcurl was built with SSL disabled, https: not supported!
* About to connect() to sourceforge.net:80
* Connected to sourceforge.net (216.136.171.196) port 80
> GET /export/xml_export.php?group_id=1012 HTTP/1.1
User-Agent: curl/7.9.8 (i386-redhat-linux-gnu) libcurl 7.9.8
Host: sourceforge.net
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 119 0 119 0 0 221 0 --:--:-- 0:00:00 --:--:-- 0
* Connection #0 left intact
* Closing connection #0
So curl thinks SSL is unavailable. But if that's so, why did I get a response
back at all? Note that
snark:~/WWW/forgetool$ curl-config --feature
SSL
IPv6
So curl-config seems to think libcurl is SSL-enabled. What could produce
this inconsistency?
And I need to turn these commands into pycurl calls.
curl -v -L -d "form_loginname=$user&form_pw=$passwd&return_to=&stay_in_ssl=1&login=Login%20With%20SSL" 'https://sourceforge.net/account/login.php' -D bonkers -o loginpage.html
# get the XML
curl -v -b bonkers -o export.xml "http://sourceforge.net/export/xml_export.php?group_id=$project"
If I understand the options correctly, I'm wondering why there's no file named bonkers
left in the current directory afterwards.
-- Eric S. Raymond ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-08-06