提交 62caf87c 编写于 作者: W wizardforcel

fix bug

上级 40af440a
......@@ -56,8 +56,8 @@ class BaijiaApi:
def image_upload(self, img):
md5 = calc_md5(img)
if self.exist(md5):
return self.default_url(md5)
url = self.exist(md5)
if url: return {'code': 0, 'data': url}
url = 'https://rsbjh.baidu.com/builderinner/api/content/file/upload?is_waterlog=0'
files = {
......
......@@ -217,7 +217,7 @@ class BiliApi:
def image_upload(self, data):
sha1 = calc_sha1(data)
url = self.exist(sha1)
if url: return {'code': 0, 'data': {'image_url': url}}
if url: return {'code': 0, 'data': url}
url = "https://api.vc.bilibili.com/api/v1/drawImage/upload"
headers = BiliApi.default_hdrs.copy()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册