xync-client 0.0.110__tar.gz → 0.0.111__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xync-client might be problematic. Click here for more details.
- {xync_client-0.0.110/xync_client.egg-info → xync_client-0.0.111}/PKG-INFO +1 -1
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Payeer/__init__.py +28 -49
- {xync_client-0.0.110 → xync_client-0.0.111/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.110 → xync_client-0.0.111}/.env.sample +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/.gitignore +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/README.md +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/makefile +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/pyproject.toml +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/setup.cfg +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/TestAgent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/TestAsset.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/TestEx.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/TestOrder.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Binance/test_binance.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Gate/test_gate.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Wallet/test_agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/Wallet/test_ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/tests/_todo_refact/_test_ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Asset.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/BaseTest.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Exception.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/InAgent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/PmAgent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Abc/xtype.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BitGet/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/BitPapa/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/InAgent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/etype/cred.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/etype/order.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/order.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Bybit/ws.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Gate/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Gate/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Gmail/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/etype/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/etype/cred.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/etype/test.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/KuCoin/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/KuCoin/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/KuCoin/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Mexc/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Mexc/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Mexc/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Okx/etype/ad.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Okx/etype/pm.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/.gitignore +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Alfa/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Alfa/state.json +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/MTS/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Ozon/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Payeer/.gitignore +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Payeer/api.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Payeer/login.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Sber/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Sber/utils.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Tinkoff/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Volet/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Volet/_todo_req/req.mjs +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Volet/_todo_req/req.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Volet/api.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Volet/pl.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Xync/__main__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Xync/ed.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/Pms/Yandex/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/asset.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/inAgent.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/pyd.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/__init__.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/loader.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client/pm_unifier.py +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.110 → xync_client-0.0.111}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
from asyncio import run
|
|
3
2
|
from datetime import datetime
|
|
4
3
|
from decimal import Decimal
|
|
@@ -8,7 +7,7 @@ from time import sleep
|
|
|
8
7
|
|
|
9
8
|
from asyncpg.pgproto.pgproto import timedelta
|
|
10
9
|
from payeer_api import PayeerAPI
|
|
11
|
-
from playwright.async_api import async_playwright, Playwright
|
|
10
|
+
from playwright.async_api import async_playwright, Playwright
|
|
12
11
|
from playwright._impl._errors import TimeoutError
|
|
13
12
|
|
|
14
13
|
from xync_client.loader import TORM
|
|
@@ -39,50 +38,55 @@ class Client(PmAgentClient):
|
|
|
39
38
|
await self.page.context.add_cookies([cookie])
|
|
40
39
|
await self.page.goto(self.pages.SEND)
|
|
41
40
|
|
|
42
|
-
async def send(self, dest: str, amount: int, cur: str) -> tuple[int, bytes
|
|
43
|
-
self.last_active = datetime.now()
|
|
41
|
+
async def send(self, dest: str, amount: int, cur: str) -> tuple[int, bytes] | int:
|
|
44
42
|
page = self.page
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
if not page.url.startswith(self.pages.SEND):
|
|
44
|
+
try:
|
|
45
|
+
await page.goto(self.pages.SEND)
|
|
46
|
+
except TimeoutError:
|
|
47
|
+
await login(self.agent)
|
|
48
|
+
for cookie in self.agent.state["cookies"]:
|
|
49
|
+
await page.context.add_cookies([cookie])
|
|
50
|
+
await page.goto("https://payeer.com/en/account/send/")
|
|
52
51
|
fiat_accounts = await page.locator(
|
|
53
52
|
f".balance-item.balance-item--green.balance-item--{cur.lower()}"
|
|
54
53
|
).all_text_contents()
|
|
55
|
-
|
|
56
|
-
if float(amount) <= has_amount:
|
|
54
|
+
if float(amount) <= float(fiat_accounts[0].replace(",", "").strip()):
|
|
57
55
|
await page.locator('input[name="param_ACCOUNT_NUMBER"]').fill(dest)
|
|
58
56
|
await page.locator("select[name=curr_receive]").select_option(value=cur)
|
|
57
|
+
sleep(0.9)
|
|
58
|
+
await page.locator('input[name="sum_receive"]').fill(str(amount))
|
|
59
|
+
sleep(0.1)
|
|
60
|
+
# await page.locator("div.n-form--title").first.click()
|
|
61
|
+
# sleep(0.1)
|
|
62
|
+
await page.click(".btn.n-form--btn.n-form--btn-mod")
|
|
59
63
|
sleep(0.5)
|
|
60
|
-
await
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
await page.click(".btn.n-form--btn.n-form--btn-mod")
|
|
65
|
+
sleep(1.2)
|
|
66
|
+
if await page.locator(".input4").count():
|
|
67
|
+
await page.locator(".input4").fill(self.agent.auth.get("master_key"))
|
|
68
|
+
await page.click(".ok.button_green2")
|
|
69
|
+
sleep(0.1)
|
|
70
|
+
await page.locator(".note_txt").wait_for(state="visible")
|
|
65
71
|
if await page.locator('.note_txt:has-text("successfully completed")').count():
|
|
66
72
|
transaction = await page.locator(".note_txt").all_text_contents()
|
|
67
73
|
trans_num = int(transaction[0].replace("Transaction #", "").split()[0])
|
|
68
74
|
await page.goto("https://payeer.com/ru/account/history/")
|
|
69
|
-
sleep(1.5)
|
|
70
75
|
await page.click(f".history-id-{trans_num} a.link")
|
|
71
|
-
await page.wait_for_selector(".ui-dialog.ui-corner-all", state="visible", timeout=5000)
|
|
72
76
|
sleep(1)
|
|
73
77
|
receipt = await page.query_selector(".ui-dialog.ui-corner-all")
|
|
74
|
-
return trans_num, await receipt.screenshot(path=f"tmp/{dest}.png")
|
|
78
|
+
return trans_num, await receipt.screenshot(path=f"tmp/{dest}.png")
|
|
75
79
|
else:
|
|
76
80
|
await self.bot.send("Payeer хз", self.uid, photo=await self.page.screenshot())
|
|
77
|
-
|
|
81
|
+
return -1
|
|
78
82
|
else:
|
|
79
|
-
have_amount =
|
|
83
|
+
have_amount = int(fiat_accounts[0].strip())
|
|
80
84
|
await self.bot.send(
|
|
81
85
|
f"Payeer no have {amount}, only {have_amount}{cur} to {dest}",
|
|
82
86
|
self.uid,
|
|
83
87
|
photo=await self.page.screenshot(),
|
|
84
88
|
)
|
|
85
|
-
|
|
89
|
+
return have_amount
|
|
86
90
|
|
|
87
91
|
def check_in(
|
|
88
92
|
self, amount: Decimal | int | float, cur: str, tme: datetime = None, tid: str | int = None
|
|
@@ -108,31 +112,6 @@ class Client(PmAgentClient):
|
|
|
108
112
|
async def proof(self) -> bytes: ...
|
|
109
113
|
|
|
110
114
|
|
|
111
|
-
async def fill_amount(loc: Locator, amount: str):
|
|
112
|
-
await loc.wait_for(state="visible")
|
|
113
|
-
await loc.fill(amount)
|
|
114
|
-
sleep(2)
|
|
115
|
-
if await loc.input_value() != amount or await loc.input_value() != amount:
|
|
116
|
-
logging.warning("Fill amount repeated!")
|
|
117
|
-
await fill_amount(loc, amount)
|
|
118
|
-
else:
|
|
119
|
-
...
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
async def click_send(loc1: Locator, count: int = 1):
|
|
123
|
-
if await loc1.is_visible():
|
|
124
|
-
await loc1.click(delay=90)
|
|
125
|
-
sleep(2)
|
|
126
|
-
try:
|
|
127
|
-
await loc1.wait_for(state="hidden", timeout=2000 * count)
|
|
128
|
-
except TimeoutError:
|
|
129
|
-
if count < 4:
|
|
130
|
-
logging.warning("Click repeated!")
|
|
131
|
-
await click_send(loc1, count + 1)
|
|
132
|
-
else:
|
|
133
|
-
raise TimeoutError
|
|
134
|
-
|
|
135
|
-
|
|
136
115
|
async def main(uid: int):
|
|
137
116
|
from x_model import init_db
|
|
138
117
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|