try to use curl_cffi

This commit is contained in:
2024-10-05 00:51:51 +02:00
parent 6976e0f484
commit c2db1035c4
3 changed files with 44 additions and 15 deletions
+3 -3
View File
@@ -103,6 +103,6 @@ if __name__ == '__main__':
# '~/Desktop/contact_list_2024-05-21.xlsx',
# '~/Desktop/15_05_to_test.xlsx']
# file_list = ['~/Desktop/15_05_to_test.xlsx', '~/Desktop/16_05_to_test.xlsx']
file_list = ['~/Desktop/contact_list_all.xlsx']
send_request_for_file_list(file_list=file_list, thread_number=1,
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=18, stop_at_mins=30)
file_list = ['~/Desktop/contact_list_2024-10-04_gmx_sg_100.xlsx']
send_request_for_file_list(file_list=file_list, thread_number=2,
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=19, stop_at_mins=50)
+12 -12
View File
@@ -6,18 +6,18 @@ from proxy_manager.proxy_manager import ProxyManager
def get_address_ip(proxy_to_use):
return ""
# try:
# response = requests.get(url="https://api.ipify.org", proxies=proxy_to_use, verify=False,
# timeout=15)
# print(response.status_code)
# if response.status_code == 200:
# return response.text
# else:
# return ""
# except Exception as Error:
# print(Error)
# return "error"
# return ""
try:
response = requests.get(url="https://api.ipify.org", proxies=proxy_to_use, verify=False,
timeout=15)
print(response.status_code)
if response.status_code == 200:
return response.text
else:
return ""
except Exception as Error:
print(Error)
return "error"
if __name__ == '__main__':
+29
View File
@@ -0,0 +1,29 @@
# import requests
from curl_cffi import requests
# chrome99
# chrome100
# chrome101
# chrome104
# chrome107
# chrome110
# chrome116 [1]
# chrome119 [1]
# chrome120 [1]
# chrome123 [3]
# chrome124 [3]
# chrome99_android
# edge99
# edge101
# safari15_3 [2]
# safari15_5 [2]
# safari17_0 [1]
# safari17_2_ios [1]
# safari18_0 [4]
# safari18_0_ios [4]
TLS_JA3_CHECK_SERVER = "https://tls.browserleaks.com/json"
if __name__ == '__main__':
_res = requests.get(TLS_JA3_CHECK_SERVER, impersonate="chrome99_android")
print(_res.text)