2 Commits

Author SHA1 Message Date
Vitiko 6b3e090b4c Add encoding declaration 2023-06-24 03:22:01 -04:00
Vitiko 049beb9526 Use .content instead of .json() 2023-06-24 03:18:00 -04:00
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -1,2 +1,4 @@
# -*- coding: utf-8 -*-
from .qopy import Client
from .cli import main
+3 -1
View File
@@ -3,6 +3,7 @@
# original author.
import hashlib
import json
import logging
import time
@@ -120,7 +121,8 @@ class Client:
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
r.raise_for_status()
return r.json()
return json.loads(r.text.encode("utf-8", errors="ignore"))
# return r.json()
def auth(self, email, pwd):
usr_info = self.api_call("user/login", email=email, pwd=pwd)