Skip to content

Commit

Permalink
add: 随机deviceId
Browse files Browse the repository at this point in the history
  • Loading branch information
Hobr committed Nov 15, 2024
1 parent 5141365 commit 2df5a03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/Bilibili/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import secrets
from random import randint
from time import time

Expand Down Expand Up @@ -288,7 +289,7 @@ def CreateOrder(self) -> tuple:
"timestamp": timestamp,
"buyer_info": json.dumps(self.buyer),
"token": self.token,
"deviceId": "",
"deviceId": secrets.token_hex(),
"clickPosition": clickPosition,
"requestSource": self.scene,
**({"deliver_info": json.dumps(self.deliver, ensure_ascii=False)} if self.deliverNeed else {}),
Expand Down

0 comments on commit 2df5a03

Please sign in to comment.