[Zope] Zope URL/Page Retrieval with Python
Samir Mishra
SamirMishra at cbuae.gov.ae
Sat Nov 15 03:59:42 EST 2003
I meant to send this to the list, not to Andreas. Sorry about that.
-----Original Message-----
From: Samir Mishra
Sent: Saturday, November 15, 2003 12:48
To: 'Andreas Jung'
Subject: RE: [Zope] Zope URL/Page Retrieval with Python
I guess I wasn't clear enough on what I was looking for in my previous post.
The Zope site I'm trying to access is on another server. I'm accessing it
remotely, so I can't use external methods. I wanted to access the web page
and parse the HTML for relevant info.
And I found the answer to my question on another mailing list. If anyone's
interested --
import urllib
URLsite = "http://username:password@zserver:8080/everything/else/on/path"
usock = urllib.urlopen(URLsite)
data = usock.read()
usock.close()
Thanks.
Samir.
-----Original Message-----
From: Andreas Jung [mailto:lists at andreas-jung.com]
Sent: Saturday, November 15, 2003 11:38
To: Samir Mishra; 'zope at zope.org'
Subject: Re: [Zope] Zope URL/Page Retrieval with Python
Use an external method instead (FAQ!).
-aj
--On Samstag, 15. November 2003 10:52 Uhr +0400 Samir Mishra
<SamirMishra at cbuae.gov.ae> wrote:
> Hello All,
>
> I guess this is more of a Python question.
>
> I'm trying to access a page being generated by Zope using Python's urllib2
> module. The page requires a username/password be entered before it can be
> accessed/rendered. I'm stuck on how I can provide user credentials to a
> website requiring authentication through a Python script. Could someone
> help me out?
>
> Thanks.
>
> Regards,
> Samir
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
More information about the Zope
mailing list