13 lines
451 B
Python
13 lines
451 B
Python
import requests
|
|
import urllib.parse
|
|
|
|
gitlab_pat = 'glpat-mJPdjrPiHCTj2NqNZN_m'
|
|
headers = {'PRIVATE-TOKEN': gitlab_pat}
|
|
|
|
fname = 'src/apis/rooms/utils.ts'
|
|
file_path = urllib.parse.quote(fname, safe='')
|
|
url = f'https://gitlab.ekeepa.co/api/v4/projects/3/repository/files/{file_path}/raw?ref=main'
|
|
r = requests.get(url, headers=headers)
|
|
print(r.text[:3000])
|
|
with open('/workspace/personal/room_utils.ts', 'w', encoding='utf-8') as f:
|
|
f.write(r.text)
|