Updated Anthology templates. Walmart and Datasnipper notes. Todos.

This commit is contained in:
Norm Rasmussen
2024-08-07 19:37:41 +02:00
parent 1eb1fce129
commit c8adb91545
19 changed files with 782 additions and 139 deletions

View File

@ -5,16 +5,16 @@ import urllib.request
import base64
# Variables of the needed elements
extract_id = "506c7250-2365-456d-be91-b1e146a398fe"
auth_token = "g5k8QpUlePaL5UFSz9Kob4nbYHIyEH0W2lhtbrDu"
extract_id = "ENTER_EXTRACT_ID"
auth_token = "ENTER_AUTH_TOKEN"
base_url = "https://analytics.northpass.io/extracts"
encryption_key = "ba6iy6jPmTxlIs73f+7FcXC8FDXt98mW46WbmKpLPsY="
encryption_key = "ENTER_ENCRYPTION_KEY"
current_dir = "./"
# Set the API endpoint, authentication headers, and other parameters
headers = {
"accept": "application/json",
"X-Api-Key": "g5k8QpUlePaL5UFSz9Kob4nbYHIyEH0W2lhtbrDu",
"X-Api-Key": "ENTER_API_KEY",
}
@ -37,9 +37,9 @@ def download_file(base_url, headers, extract_id, file_id, encryption_key, iv):
download_url = data["url"]
# Downloads the file to the cwd
url_resp = urllib.request.urlretrieve(download_url, "UXDesign_API_Extract.csv.gz")
url_resp = urllib.request.urlretrieve(download_url, "Client_API_Extract.csv.gz")
file_name = url_resp[0]
decrypted_file = "UXDesign_Accessible.csv.gz"
decrypted_file = "Client_File.csv.gz"
# Base64 > Hex
encryption_key = base64.b64decode(encryption_key).hex()