look1z / 91porn-spider

91porn批量视频、图片下载 ;新手爬虫;novice spider ;多线程
109 stars 24 forks source link

base64解密失败 #7

Open xhaimxd opened 4 years ago

xhaimxd commented 4 years ago

Exception in thread Thread-2: Traceback (most recent call last): File "D:\env\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "D:\env\Python27\lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "D:/91porn-spider-master/test.py", line 121, in spider video_url = strdecode(input=input, key=encode_key) File "D:/91porn-spider-master/test.py", line 34, in strdecode input = base64.b64decode(input).decode("utf-8") File "D:\env\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xeb in position 0: invalid continuation byte

应该不是utf8编码的

xhaimxd commented 4 years ago

应该是加密方式变了,自己已经尝试解决了,但是下载的时候,不用代理看不带进度条,目测是因为响应慢的原因,但是用了代理会直接下载出nginx的404,求解决办法

look1z commented 4 years ago

最近有点忙,等忙完我看一下,可以加381769096讨论讨论

WhitePersimmon commented 4 years ago

有telegram吗 拉个群交流一波?解密这个步骤这个咋搞定的啊

xiaojunjunya commented 4 years ago

同样遇到xhaimxd一样的问题,求问怎么样解决?

zyjia commented 2 years ago

最近有点忙,等忙完我看一下,可以加381769096讨论讨论

应该是加密方式变了,自己已经尝试解决了,但是下载的时候,不用代理看不带进度条,目测是因为响应慢的原因,但是用了代理会直接下载出nginx的404,求解决办法

这个如何解决啊,我也碰到一样的问题,谢谢

Exception in thread Thread-2: Traceback (most recent call last): File "D:\env\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "D:\env\Python27\lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "D:/91porn-spider-master/test.py", line 121, in spider video_url = strdecode(input=input, key=encode_key) File "D:/91porn-spider-master/test.py", line 34, in strdecode input = base64.b64decode(input).decode("utf-8") File "D:\env\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xeb in position 0: invalid continuation byte

应该不是utf8编码的

这个如何解决啊,我也碰到一样的问题,谢谢

zyjia commented 2 years ago

Exception in thread Thread-2: Traceback (most recent call last): File "D:\env\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "D:\env\Python27\lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "D:/91porn-spider-master/test.py", line 121, in spider video_url = strdecode(input=input, key=encode_key) File "D:/91porn-spider-master/test.py", line 34, in strdecode input = base64.b64decode(input).decode("utf-8") File "D:\env\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xeb in position 0: invalid continuation byte

应该不是utf8编码的

我在网上找了一个用javascript写的,可以解密,如何转换到python呢,不会, function strencode(input, key) { input = atob(input); len = key.length; code = ''; for (i = 0; i < input.length; i++) { k = i % len; code += String.fromCharCode(input.charCodeAt(i) ^ key.charCodeAt(k)); } return atob(code); }