MCPcopy Index your code
hub / github.com/SpiderClub/weibospider / upload

Method upload

utils/code_verification.py:54–65  ·  view source on GitHub ↗
(self, filename, codetype, timeout)

Source from the content-addressed store, hash-verified

52 return -9001
53
54 def upload(self, filename, codetype, timeout):
55 data = {'method': 'upload', 'username': self.username, 'password': self.password, 'appid': self.appid,
56 'appkey': self.appkey, 'codetype': str(codetype), 'timeout': str(timeout)}
57 file = {'file': filename}
58 response = self.request(data, file)
59 if response:
60 if response['ret'] and response['ret'] < 0:
61 return response['ret']
62 else:
63 return response['cid']
64 else:
65 return -9001
66
67 def result(self, cid):
68 data = {'method': 'result', 'username': self.username, 'password': self.password, 'appid': self.appid,

Callers 1

decodeMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected