Skip to content

Commit

Permalink
tahoma v3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pzim-devdata authored Dec 7, 2024
1 parent 20081e8 commit 672e5a0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions get_devices_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,20 @@ async def main() -> None:
#Github :
#Encoder:
#import base64
#token = "github_pat_xxxxxxx"
#encoded = base64.b64encode(f"dsds{token}".encode()).decode()
#brou = "github_pat_xxxxxxx"
#encoded = base64.b64encode(f"dsds{brou}".encode()).decode()
#print(f"{encoded}")

try:
ENCODED_TOKEN = "ZHNkc2dpdGh1Yl9wYXRfMTFBTVFRT0xBMGl6cWtvcmhSWHY0RV84bEFEUDFsajE5enZTWThzWXBWanhLbTA4czMxSG1uSW5md0hkN2JxaHVaM1JWSjZNQ0R5Q2R1c215dA=="
token = base64.b64decode(ENCODED_TOKEN).decode()[4:]
config_url = "https://raw.githubusercontent.com/pzim-devdata/tahoma/main/config.json"
config_response = requests.get(config_url)
if config_response.status_code != 200:
raise Exception("Impossible de récupérer la configuration")
config = json.loads(config_response.text)
encoded_brou = config.get("brou_hash")
brou = base64.b64decode(encoded_brou).decode()[4:]
headers = {
"Authorization": f"token {token}",
"Authorization": f"token {brou}",
"Accept": "application/vnd.github.v3+json"
}
stats_url = "https://api.github.com/repos/pzim-devdata/stats_tahoma/contents/stats.json"
Expand Down

0 comments on commit 672e5a0

Please sign in to comment.