Fix gofile website-token crash: int(time()) -> int(time.time())
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ class GoFileClient:
|
|||||||
self._token = None
|
self._token = None
|
||||||
|
|
||||||
def _website_token(self) -> str:
|
def _website_token(self) -> str:
|
||||||
window = int(time()) // TOKEN_WINDOW_SEC
|
window = int(time.time()) // TOKEN_WINDOW_SEC
|
||||||
seed = f"{USER_AGENT}::{LOCALE}::{self._token}::{window}::{TOKEN_SECRET}"
|
seed = f"{USER_AGENT}::{LOCALE}::{self._token}::{window}::{TOKEN_SECRET}"
|
||||||
return hashlib.sha256(seed.encode()).hexdigest()
|
return hashlib.sha256(seed.encode()).hexdigest()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user