From 1382aebcc7f8911b54d4e59ceb2814ce7a357fec Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 17 Apr 2003 11:36:12 +0000 Subject: [PATCH] more imports git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@835 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/HttpUrlData.py | 5 +++-- linkcheck/UrlData.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/linkcheck/HttpUrlData.py b/linkcheck/HttpUrlData.py index ead06bba..65c81074 100644 --- a/linkcheck/HttpUrlData.py +++ b/linkcheck/HttpUrlData.py @@ -15,7 +15,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import urlparse, urllib, sys, time, re, httplib +import urlparse, sys, time, re, httplib +from urllib import unquote import Config, StringUtil, i18n from linkcheck import robotparser from debug import * @@ -124,7 +125,7 @@ class HttpUrlData (ProxyUrlData): newurl = self.headers.getheader("Location", self.headers.getheader("Uri", "")) redirected = urlparse.urljoin(redirected, newurl) - redirected = urllib.unquote(redirected) + redirected = unquote(redirected) self.urlparts = urlparse.urlsplit(redirected) response = self._getHttpResponse() self.headers = response.msg diff --git a/linkcheck/UrlData.py b/linkcheck/UrlData.py index 1ba48d54..5da6d438 100644 --- a/linkcheck/UrlData.py +++ b/linkcheck/UrlData.py @@ -16,7 +16,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sys, re, urlparse, urllib, time, traceback, socket, select, i18n -from urllib import splituser, splithost, splitport +from urllib import splituser, splithost, splitport, unquote #try: # from linkcheck import DNS #except ImportError: @@ -175,7 +175,7 @@ class UrlData: else: self.url = self.urlName # unquote url - self.url = urllib.unquote(self.url) + self.url = unquote(self.url) # split into (modifiable) list self.urlparts = list(urlparse.urlsplit(self.url)) # check userinfo@host:port syntax