lzghades commited on
Commit
84dce4d
1 Parent(s): 6717155
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -16,14 +16,12 @@ HEADERS = {'app-key': os.environ['a3'], 'origin': os.environ['a4'], 'referer': o
16
  def login(loginId, password):
17
  try:
18
  data = {'loginId': loginId, 'password': password}
19
- cookies = {'720yun_v8_session': uuid.uuid4()}
20
 
21
  resp = requests.post(os.environ['a5'], data=data, headers=HEADERS, cookies=cookies)
22
- print(resp.text)
23
  if resp.status_code == 200:
24
  return resp.json()['data']['token']
25
- except Exception as e:
26
- print(e)
27
  raise gr.Error('登录错误,请确认你的720yun账号是否正确')
28
 
29
 
 
16
  def login(loginId, password):
17
  try:
18
  data = {'loginId': loginId, 'password': password}
19
+ cookies = {'720yun_v8_session': str(uuid.uuid4())}
20
 
21
  resp = requests.post(os.environ['a5'], data=data, headers=HEADERS, cookies=cookies)
 
22
  if resp.status_code == 200:
23
  return resp.json()['data']['token']
24
+ except Exception:
 
25
  raise gr.Error('登录错误,请确认你的720yun账号是否正确')
26
 
27