From edd06e5bbbbb307b4b43ce68c4b1df7ccae7544e Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 24 Dec 2022 14:10:42 +0000 Subject: [PATCH] Fix params --- commands/pygg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/pygg.py b/commands/pygg.py index 00148a0..512bf20 100755 --- a/commands/pygg.py +++ b/commands/pygg.py @@ -36,8 +36,9 @@ class FlareRequests(requests.Session): else: raise requests.RequestException(response) - url += "&" if len(url.split("?")) > 1 else "?" - url = f"{url}{urllib.parse.urlencode(params)}" + if params: + url += "&" if len(url.split("?")) > 1 else "?" + url = f"{url}{urllib.parse.urlencode(params)}" post_data = { "cmd": f"request.{method.lower()}",