shauryaDugar commited on
Commit
a10b9ec
·
verified ·
1 Parent(s): b6c8ee1

Update lichess_api.py

Browse files
Files changed (1) hide show
  1. lichess_api.py +2 -2
lichess_api.py CHANGED
@@ -12,14 +12,14 @@ def send_request(pgn):
12
 
13
 
14
  def send_request_study(pgn):
15
- url2 = "https://lichess.org/api/study/Kc7E2x1A/import-pgn"
16
  data = json.dumps({"pgn": pgn, "name":"TEST STUDY"})
17
  headers = {'Content-type': 'application/json', 'Authorization': 'Bearer lip_BjQvmi41pb705z5JhSRE'}
18
  response = requests.post(url2, data=data, headers=headers)
19
  print(response.status_code)
20
  print(response.json())
21
  chapter_id = response.json()["chapters"][0]["id"]
22
- study_game_link = "https://lichess.org/study/Kc7E2x1A/" + chapter_id
23
  print(study_game_link)
24
  return study_game_link
25
 
 
12
 
13
 
14
  def send_request_study(pgn):
15
+ url2 = "https://lichess.org/api/study/3qgckOtd/import-pgn"
16
  data = json.dumps({"pgn": pgn, "name":"TEST STUDY"})
17
  headers = {'Content-type': 'application/json', 'Authorization': 'Bearer lip_BjQvmi41pb705z5JhSRE'}
18
  response = requests.post(url2, data=data, headers=headers)
19
  print(response.status_code)
20
  print(response.json())
21
  chapter_id = response.json()["chapters"][0]["id"]
22
+ study_game_link = "https://lichess.org/study/3qgckOtd/" + chapter_id
23
  print(study_game_link)
24
  return study_game_link
25