Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Commit 4ef3eee

Browse files
committed
cfghjn
1 parent d4b932e commit 4ef3eee

7 files changed

Lines changed: 7 additions & 5 deletions

File tree

client_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
import anyio
33
from rich.pretty import pprint as print
44
import json
5+
from pocketoptionapi.constants import REGION
56

6-
SESSION = r'42["auth",{"session":"a:4:{s:10:\"session_id\";s:32:\"da7a5a82c8f6c35a87b2ee31d4f5b3b4\";s:10:\"ip_address\";s:10:\"90.36.9.15\";s:10:\"user_agent\";s:120:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OP\";s:13:\"last_activity\";i:1707667599;}3a0058a58a6df5e7b49f652f8e4f8249","isDemo":1,"uid":27658142,"platform":1}]'
7+
SESSION = r'42["auth",{"session":"a:4:{s:10:\"session_id\";s:32:\"a1dc009a7f1f0c8267d940d0a036156f\";s:10:\"ip_address\";s:12:\"190.162.4.33\";s:10:\"user_agent\";s:120:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OP\";s:13:\"last_activity\";i:1709914958;}793884e7bccc89ec798c06ef1279fcf2","isDemo":0,"uid":27658142,"platform":1}]'
78

89

910
async def websocket_client(url, pro):
10-
while True:
11+
for i in REGION.get_regions(REGION):
12+
print(f"Trying {i}...")
1113
try:
1214
async with websockets.connect(
1315
url,
@@ -23,7 +25,7 @@ async def websocket_client(url, pro):
2325
except Exception as e:
2426
print(e)
2527
print("Connection lost... reconnecting")
26-
await anyio.sleep(5)
28+
# await anyio.sleep(5)
2729
return True
2830

2931

-14 Bytes
Binary file not shown.
-14 Bytes
Binary file not shown.
-14 Bytes
Binary file not shown.
-14 Bytes
Binary file not shown.
-17 Bytes
Binary file not shown.

pocketoptionapi/backend/ws/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ async def websocket_client(self, url, pro):
1414
async with websockets.connect(
1515
url,
1616
extra_headers={
17-
"Origin": "https://pocket-link19.co",
18-
# "Origin": "https://po.trade/"
17+
# "Origin": "https://pocket-link19.co",
18+
"Origin": "https://po.trade/"
1919
},
2020
) as websocket:
2121
async for message in websocket:

0 commit comments

Comments
 (0)