Updated to new oauth format. Removed pypasser dependency.

This commit is contained in:
2025-05-11 10:20:19 +02:00
parent c1b7056838
commit 51aabe8b53
2 changed files with 63 additions and 47 deletions

View File

@@ -6,10 +6,14 @@ import urllib.parse
from urllib.request import urlretrieve
from pathlib import Path
# Set to False to allow packet sniffing/capture.
# Set separately for dmmBypass
SSL_VERIFY = True
def get_file_list(url):
url = "https://apidgp-gameplayer.games.dmm.com" + url
print("Retrieving file list from " + url)
result = requests.get(url)
result = requests.get(url, verify=SSL_VERIFY)
result.raise_for_status()
data = result.json()["data"]
return data["domain"], data["file_list"]
@@ -71,7 +75,7 @@ def update_game(game_path, files_url, files_param):
file = files_to_download[index]
url, path = file["url"], file["path"]
response = requests.get(url, timeout=10, stream=True)
response = requests.get(url, timeout=10, stream=True, verify=SSL_VERIFY)
total_size = int(response.headers.get("content-length", 0))
block_size = 1024 * 1024
downloaded = 0