提交 28c43ec9 编写于 作者: W wizardforcel

修复编码器 bug

上级 d65463a2
......@@ -30,7 +30,6 @@ class CsdnApi:
return None
def real2meta(self, url):
print('url:', url)
return 'csdrive://' + self.extract_hash(url)
def login(self, un, pw):
......
......@@ -30,7 +30,6 @@ class WeiboApi:
return None
def real2meta(self, url):
print('url:', url)
return 'wbdrive://' + self.extract_hash(url)
def login(self, un, pw):
......
......@@ -3,6 +3,7 @@ from .BaijiaApi import BaijiaApi
from .CsdnApi import CsdnApi
from .SohuApi import SohuApi
from .JianApi import JianApi
from .WeiboApi import WeiboApi
drivers = {
'bili': BiliApi(),
......@@ -10,6 +11,7 @@ drivers = {
'csdn': CsdnApi(),
'sohu': SohuApi(),
'jian': JianApi(),
'weibo': WeiboApi(),
}
prefixes = {
......@@ -19,4 +21,5 @@ prefixes = {
'csdrive': 'csdn',
'shdrive': 'sohu',
'jsdrive': 'jian',
'wbdrive': 'weibo',
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ class GifEncoder:
img = Image.frombytes('L', (side, side), data)
bio = BytesIO()
img.save(bio, 'gif')
img.save(bio, 'gif', optimize=False)
return bio.getvalue()
def decode(self, data):
......
......@@ -7,4 +7,5 @@ encoders = {
'csdn': PngEncoder(),
'sohu': PngEncoder(),
'jian': PngEncoder(),
'weibo': GifEncoder(),
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册