feat: 小红书增加手机号自动登录模式

This commit is contained in:
Relakkes
2023-06-16 20:10:29 +08:00
parent c0a783fa35
commit 8206f83639
11 changed files with 347 additions and 71 deletions
+18
View File
@@ -1,3 +1,5 @@
import re
import time
import random
import base64
from io import BytesIO
@@ -57,3 +59,19 @@ def convert_cookies(cookies: Optional[List[Cookie]]) -> Tuple[str, Dict]:
for cookie in cookies:
cookie_dict[cookie.get('name')] = cookie.get('value')
return cookies_str, cookie_dict
def get_current_timestamp():
return int(time.time() * 1000)
def match_interact_info_count(count_str: str) -> int:
if not count_str:
return 0
match = re.search(r'\d+', count_str)
if match:
number = match.group()
return int(number)
else:
return 0