new api refactor setup
This commit is contained in:
36
pyapi/main.py
Normal file
36
pyapi/main.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
CONSTANTS = {
|
||||
"SESSION_KEY_NAME": "SID",
|
||||
"SESSION_EXPIRE_TIME_MS": 6 * 60 * 60 * 1000,
|
||||
"POST_SESSION_KEY": "postsession",
|
||||
"LAST_FETCHED_KEY": "LAST_FETCHED",
|
||||
"SCRAP_API_URL": "https://gamebooking24.com/lottery-api",
|
||||
"SCRAP_API_SESSION_KEY": "SRAJWT",
|
||||
"SCRAP_API_BASE_HEADERS": {
|
||||
"Host": "gamebooking24.com",
|
||||
"Sec-Ch-Ua": '"Not/A)Brand";v="8", "Chromium";v="126"',
|
||||
"Sec-Ch-Ua-Mobile": "?0",
|
||||
"Sec-Ch-Ua-Platform": '"Windows"',
|
||||
"Sec-Fetch-Site": "cross-site",
|
||||
"Sec-Fetch-Mode": "no-cors",
|
||||
"Sec-Fetch-Dest": "image",
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "en-US,en;q=0.9",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Origin": "https://gamebooking24.com",
|
||||
"Referer": "https://gamebooking24.com/",
|
||||
"Priority": "u=1, i",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@app.get("/ping")
|
||||
def ping():
|
||||
return "pong"
|
||||
|
||||
|
||||
# TODO: Implement every single "proxy" endpoint now
|
||||
Reference in New Issue
Block a user