From c05705262cddd8fbe68942cb257d2ca7f9dd8df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= <34892635+fa0311@users.noreply.github.com> Date: Sat, 23 Jul 2022 07:10:14 +0900 Subject: [PATCH] =?UTF-8?q?fix=20=E3=80=8C=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=80=8D=E3=81=AE=E5=95=8F=E9=A1=8C=20#34?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DMMGamePlayerFastLauncher.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/DMMGamePlayerFastLauncher.py b/DMMGamePlayerFastLauncher.py index 9adf0fc..221ce1b 100644 --- a/DMMGamePlayerFastLauncher.py +++ b/DMMGamePlayerFastLauncher.py @@ -10,6 +10,7 @@ import sqlite3 import os import time +import re def gen_rand_hex(): @@ -95,15 +96,25 @@ def get_dpg5_config(dgp5_path): blob = f.read() if blob == b"" or arg.login_force: session = get_dgp5_session(DGP5_PATH) + + response = session.get( + "https://www.dmm.com/", + headers=HEADERS, + proxies=PROXY, + ).text + + reg = ''.format(any=".*?",data="([0-9a-zA-Z_]*)") + data_encoded = re.findall(reg, response)[0] + response = session.get( - "https://www.dmm.com/my/-/login/auth/=/direct_login=1/path=DRVESVwZTkVPEh9cXltIVA4IGV5ETRQWVlID", + f"https://accounts.dmm.com/service/login/token/=/path={data_encoded}", headers=HEADERS, proxies=PROXY, ) if session.cookies.get("login_session_id") == None: if not arg.skip_exception: raise Exception( - "ログインに失敗しました\nDMMGamePlayerでログインしていない時またはDMMGamePlayerが起動している時にこのエラーが発生する可能性があります" + "ログインに失敗しました\nDMMGamePlayerを起動してログインし直して下さい" ) contents = json.dumps( {