urlparse
Verfasst: Montag 29. September 2008, 20:13
Hallo,
ich verzweifle gerade...
Error:
Ich verstehe nicht warum das nicht geht... Ich rufe die Daten aus einer Datenbank ab. Python Version: 2.4, OS-Linux-Debian.
Danke
MfG
ich verzweifle gerade...
Code: Alles auswählen
import urlparse
parsed_url = urlparse.urlsplit(url)
print parsed_url.netloc
Code: Alles auswählen
[Mon Sep 29 21:08:07 2008] [error] [client IP] PythonHandler mod_python.cgihandler: Traceback (most recent call last):
[Mon Sep 29 21:08:07 2008] [error] [client IP] PythonHandler mod_python.cgihandler: File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req)
[Mon Sep 29 21:08:07 2008] [error] [client IP] PythonHandler mod_python.cgihandler: File "/usr/lib/python2.4/site-packages/mod_python/cgihandler.py", line 96, in handler\n imp.load_module(module_name, fd, path, desc)
[Mon Sep 29 21:08:07 2008] [error] [client IP] PythonHandler mod_python.cgihandler: File "/var/www/vhosts/aaa/index.py", line 24, in ?\n print parsed_url.netloc
[Mon Sep 29 21:08:07 2008] [error] [client IP] PythonHandler mod_python.cgihandler: AttributeError: 'tuple' object has no attribute 'netloc'
Danke
MfG