From c708596d1c76339bb8c4c336d3af12cba0a963ee Mon Sep 17 00:00:00 2001 From: j Date: Sun, 27 Apr 2008 19:08:28 +0200 Subject: [PATCH] just use domain, not subdomain --- oxutils/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxutils/cache.py b/oxutils/cache.py index 912fd43..a87cf8f 100644 --- a/oxutils/cache.py +++ b/oxutils/cache.py @@ -35,7 +35,7 @@ def getUrlCacheFile(url, data=None, headers=DEFAULT_HEADERS): url_hash = sha.sha(url + '?' + data).hexdigest() else: url_hash = sha.sha(url).hexdigest() - domain = urlparse.urlparse(url)[1] + domain = ".".join(urlparse.urlparse(url)[1].split('.')[-2:]) return os.path.join(getCacheBase(), domain, url_hash[:2], url_hash[2:4], url_hash[4:6], url_hash) def loadUrlCache(url_cache_file, data, timeout=cache_timeout):