-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.py
53 lines (42 loc) · 1.38 KB
/
test.py
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import asyncio
import playwright.async_api
from utils.async_solver import solver
from router.arkose import build_page_data as arkose_build
from router.recaptcha import build_page_data as recaptcha_build
from router.turnstile import build_page_data as turnstile_build
async def arkose_test():
url = "https://chat.openai.com/"
publickey = "35536E1E-65B4-4D96-9D97-6ADB7EFF8147"
subdomain = "tcr9i.chat.openai.com"
print(
await solver.solve(
url=url, page_data=arkose_build(publickey=publickey, subdomain=subdomain)
)
)
async def recaptcha_test():
url = "https://accounts.pixiv.net/login"
sitekey = "6LfF1dcZAAAAAOHQX8v16MX5SktDwmQINVD_6mBF"
action = "accounts/login"
print(
await solver.solve(
url=url, page_data=recaptcha_build(sitekey=sitekey, action=action)
)
)
async def turnstile_test():
url = "https://modrinth.com/auth/sign-up"
sitekey = "0x4AAAAAAAHWfmKCm7cUG869"
invisible = False
print(
await solver.solve(
url=url, page_data=turnstile_build(sitekey=sitekey, invisible=invisible)
)
)
async def main():
global solver
p = await playwright.async_api.async_playwright().start()
await solver.start_browser(p)
await arkose_test()
await recaptcha_test()
await turnstile_test()
if __name__ == "__main__":
asyncio.run(main())