-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathexample1 - preset.py
More file actions
38 lines (28 loc) · 1.08 KB
/
Copy pathexample1 - preset.py
File metadata and controls
38 lines (28 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import asyncio
import noble_tls
from noble_tls import Client
# You can also use the following as `client_identifier`:
# Chrome --> chrome_103, chrome_104, chrome_105, chrome_106, chrome_107, chrome_108, chrome109, Chrome110,
# chrome111, chrome112
# Firefox --> firefox_102, firefox_104, firefox108, Firefox110
# Opera --> opera_89, opera_90
# Safari --> safari_15_3, safari_15_6_1, safari_16_0
# iOS --> safari_ios_15_5, safari_ios_15_6, safari_ios_16_0
# iPadOS --> safari_ios_15_6
# Android --> okhttp4_android_7, okhttp4_android_8, okhttp4_android_9, okhttp4_android_10, okhttp4_android_11,
# okhttp4_android_12, okhttp4_android_13
async def main():
await noble_tls.update_if_necessary()
session = noble_tls.Session(
client=Client.NIKE_IOS_MOBILE,
debug=True,
)
res = await session.get(
"https://bit.ly/3K5GY8J",
)
print("Status code:", res.status_code)
print("Headers:", res.text)
for history in res.history:
print(f">> From URL: {history.url}")
print(f">> Current URL: {res.url}")
asyncio.run(main())