[Zope] Re: Call Zope objects using wget

Josef Meile jmeile at hotmail.com
Thu Sep 16 09:01:13 EDT 2004


Hi Paolo

>>> I need to call a Python script (that simply creates a new folder 
>>> object with a unique name) via wget.
>>>
>>> When I manually invoke the command using via shell,
>>>
>>> wget -d --spider --http-user=myuser --http-passwd=mypassword 
>>> http://my.url.it/intranet/reset_portal_content/ZScriptHTML_tryForm
>>>
>>> the folder object isn't created,
>>
>>
>>
>> Are you sure?
>>
>>
>>> while calling the script via Test tab 
>>
>>
>>> from the ZMI works correctly.
> 
> 
> Well, digging with more time into the problem... I have found that 
> almost surely the cause is the presence of CookieCrumbler (which I 
> didn't even mention in the previous mail), used for authentication in 
> that Zope site.
It is strange, I'm also using wget to do authentication, I have too a 
CookieCrumbler, and it works. The only thing I made different is the 
wget call. I use:

wget -q --delete-after https://myUrl.com

Because I don't want somebody to see the password when doing a "ps -ef", 
I stored the user and password in a protected .wgetrc file (only my zope 
user can read it):

http-user=myUser
http-passwd=myPassword

If you are running this command on a cron event, I suggest you to do the 
same. I think Lynx has also a rc file: ".lynxrc".

Greetings,
Josef


More information about the Zope mailing list