Closed shuijinliuxi closed 9 years ago
这个是因为知乎的tex图片名称过长,而且没有后缀名导致的,我回头修掉它
嗯,我也知道是这个问题,想问下:这种情况下生成的电子书中该图片是否能够正常
新的异常(最新版):
Exception in thread Thread-36687: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run self.__target(_self.args, *_self.__kwargs) File "/Users/oyc/Desktop/zhihuhelper1.7.1.6/codes/epubBuilder/imgDownloader.py", line 73, in worker content = self.getHttpContent(url=link, timeout=self.waitFor) File "/Users/oyc/Desktop/zhihuhelper1.7.1.6/codes/epubBuilder/imgDownloader.py", line 109, in getHttpContent rawPageData = urllib2.urlopen(request, timeout=timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 396, in open protocol = req.get_type() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 258, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: //pic2.zhimg.com/0c3ba27ceffe76d8bfce307afdc65415_b.jpg
嗯,万恶的知乎把图片链接改了- - 说好的 http://pic2.zhimg.com/0c3ba27ceffe76d8bfce307afdc65415_b.jpg呢= = 正在改,估计要到下星期或者国庆假期发布吧
哈哈,可能你被盯上了,说不定你改完发布,知乎又改了……
临时改了一版,现在可以正常下载私人收藏夹和图片了,剩下的等我国庆回了家再改吧。。。 XD
Exception in thread Thread-83: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run self.__target(_self.args, *_self._kwargs) File "/Users/oyc/Desktop/zhihuhelp1.7.1.5/codes/epubBuilder/imgDownloader.py", line 76, in worker imgFile = open(self.targetDir + fileName, 'wb') IOError: [Errno 63] File name too long: u'./\u77e5\u4e4e\u56fe\u7247\u6c60/equation?tex=%5Clim%7Bn+%5Crightarrow+%5Cinfty+%7D%7BS%7Bn%7D+%7D+%3D%5Clim%7Bn+%5Crightarrow+%5Cinfty+%7D%7B%5Cfrac%7Bb%7Bn%2B1%7D+-b%7Bn%7D+%7D%7Ba%7Bn%2B1%7D+-a%7Bn%7D+%7D+%7D+%3D%5Clim%7Bn+%5Crightarrow+%5Cinfty+%7D%5Cfrac%7B%5Cln%5Cfrac%7B%28%28n%2B1%29%21%29%5E%7Bn%2B2%7D+%7D%7B%28%5Cprod%7Bi%3D0%7D%5E%7Bn%2B1%7D%28i%21%29+%29%5E%7B2%7D+%7D+-%5Cln%5Cfrac%7B%28n%21%29%5E%7Bn%2B1%7D+%7D%7B%28%5Cprod_%7Bi%3D0%7D%5E%7Bn%7D%28i%21%29+%29%5E%7B2%7D+%7D+%7D%7B%28n%2B1%29%5E%7B2%7D-n%5E%7B2%7D++%7D+'