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