[mod] swisscows: use alphabet from string module instead of hardcoding alphabet

This commit is contained in:
Bnyro
2026-07-29 17:14:46 +02:00
parent a449518ed4
commit 98e10f9ab4

View File

@@ -9,6 +9,7 @@ import codecs
import hashlib
import json
import random
import string
from datetime import datetime
from urllib.parse import urlencode
@@ -43,8 +44,8 @@ paging = True
base_url = "https://api.swisscows.com"
CAESAR_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
NONCE_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"
CAESAR_ALPHABET = string.ascii_uppercase
NONCE_ALPHABET = string.ascii_letters + string.digits + "-._~"
time_range_map = {"day": "Day", "week": "Week", "month": "Month", "year": "Year"}