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
+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)