Problem with urllib.py
Thomas Guettler
guettli at thomas-guettler.de
Thu Jul 22 09:15:44 EDT 2004
Am Thu, 22 Jul 2004 10:43:38 +0200 schrieb Volker M.:
> Hey,
>
> I want to open a list of URLs with Pythons urllib and the fuction
> open(URL) automatically. It is important that the program open ONLY
> normal http-sites and no https-sites with user/password-request.
> So exists a possibility that I could cancel all site requests with
> user/password-dialogues?
Hi,
urllib is not interactive. If you don't send a
login+password you get an "not authorized" response
with the corresponding http error code.
You can check this return code in your script.
By the way, the user/password request (Pop-Up of browser)
is HTTP Basic Authentication, it can be used with
http or https.
HTH,
Thomas
--
Thomas Güttler, http://www.thomas-guettler.de/
More information about the Python-list
mailing list