can get le type jsdata
This commit is contained in:
@@ -38,34 +38,6 @@ def filter_contacts(_contact_list: list) -> list:
|
||||
return _contact_list_to_book
|
||||
|
||||
|
||||
def get_valid_csrf() -> str:
|
||||
captchaResultGetter = CaptchaResultGetter()
|
||||
_valid_cookie = captchaResultGetter.get_valid_cookie()
|
||||
# while _valid_cookie is None:
|
||||
# _valid_cookie = captchaResultGetter.get_valid_cookie()
|
||||
new_csrf = None
|
||||
while new_csrf is None:
|
||||
valid_cookie = None
|
||||
if _valid_cookie is not None:
|
||||
simple_cookie = SimpleCookie()
|
||||
simple_cookie.load(_valid_cookie)
|
||||
new_cookies = {k: v.value for k, v in simple_cookie.items()}
|
||||
new_coolies_str = ""
|
||||
for key in new_cookies:
|
||||
print(key)
|
||||
new_coolies_str = new_coolies_str + key + "=" + new_cookies[key] + ";"
|
||||
print(new_coolies_str)
|
||||
valid_cookie = new_coolies_str + "app=eyJmbGFzaCI6e30sImNhY2hlZmxhc2giOltdLCJjc3JmU2VjcmV0IjoiYnRodHNYU1lvdnl4RzVGakpGRDZsQ0JtIn0=;policy=accepted;lang=fr;"
|
||||
print(valid_cookie)
|
||||
new_csrf = captchaResultGetter.get_csrf(valid_cookie)
|
||||
if new_csrf is None:
|
||||
_valid_cookie = None
|
||||
while _valid_cookie is None:
|
||||
_valid_cookie = captchaResultGetter.get_valid_cookie()
|
||||
time.sleep(2)
|
||||
return new_csrf
|
||||
|
||||
|
||||
class LinkValidatorReceiver(threading.Thread):
|
||||
def __init__(self, linkpojo_list: list):
|
||||
self.connection = None
|
||||
|
||||
Reference in New Issue
Block a user