diff -uNar trunk/exe/engine/wikipediaidevice.py trunk2/exe/engine/wikipediaidevice.py --- trunk/exe/engine/wikipediaidevice.py 2011-10-27 08:47:29.771088679 +0200 +++ trunk2/exe/engine/wikipediaidevice.py 2011-10-27 08:56:09.302588678 +0200 @@ -147,12 +147,15 @@ tmpDir = TempDirPath() for imageTag in content.fetch('img'): imageSrc = unicode(imageTag['src']) - imageName = imageSrc.split('/')[-1] + #imageName = imageSrc.split('/')[-1] + imageName=urllib.unquote(imageSrc.split('/')[-1]).encode('ascii','ignore') # Search if we've already got this image if imageName not in self.images: if not imageSrc.startswith("http://"): - if imageSrc.startswith("/"): - imageSrc = netloc + imageSrc + if imageSrc.startswith("//"): + imageSrc = "http:" + imageSrc + elif imageSrc.startswith("/"): + imageSrc= netlog + imageSrc else: imageSrc = '%s/%s/%s' % (netloc, path, imageSrc) urllib.urlretrieve(imageSrc, tmpDir/imageName)