From 4a08b660497daad426190879a450d3088c91925e Mon Sep 17 00:00:00 2001 From: Levi <57452819+l3v11@users.noreply.github.com> Date: Fri, 26 Aug 2022 15:30:33 +0600 Subject: [PATCH] Fix GDToT domain issue --- bot/helper/download_utils/ddl_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/helper/download_utils/ddl_generator.py b/bot/helper/download_utils/ddl_generator.py index f5693d80..bbd1bc50 100644 --- a/bot/helper/download_utils/ddl_generator.py +++ b/bot/helper/download_utils/ddl_generator.py @@ -78,7 +78,8 @@ def gdtot(url: str) -> str: client = requests.Session() client.cookies.update({'crypt': GDTOT_CRYPT}) res = client.get(url) - res = client.get(f"https://new.gdtot.nl/dld?id={url.split('/')[-1]}") + dom = re.findall(r'https?://(.+)\.gdtot\.(.+)\/\S+\/\S+', url)[0] + res = client.get(f"https://{dom[0]}.gdtot.{dom[1]}/dld?id={url.split('/')[-1]}") url = re.findall(r'URL=(.*?)"', res.text)[0] info = {} info['error'] = False