xync-client 0.0.113__tar.gz → 0.0.115__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.113/xync_client.egg-info → xync_client-0.0.115}/PKG-INFO +1 -1
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/InAgent.py +11 -2
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Payeer/__init__.py +13 -4
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Payeer/login.py +2 -2
- {xync_client-0.0.113 → xync_client-0.0.115/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.113 → xync_client-0.0.115}/.env.sample +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/.gitignore +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/README.md +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/makefile +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/pyproject.toml +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/setup.cfg +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/TestAgent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/TestAsset.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/TestEx.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/TestOrder.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Binance/test_binance.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Gate/test_gate.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Wallet/test_agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/Wallet/test_ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/tests/_todo_refact/_test_ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Asset.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/BaseTest.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Exception.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/InAgent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/PmAgent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Abc/xtype.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BitGet/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/BitPapa/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/etype/cred.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/etype/order.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/order.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Bybit/ws.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Gate/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Gate/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Gmail/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/etype/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/etype/cred.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/etype/test.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/KuCoin/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/KuCoin/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/KuCoin/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Mexc/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Mexc/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Mexc/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Okx/etype/ad.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Okx/etype/pm.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/.gitignore +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Alfa/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Alfa/state.json +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/MTS/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Ozon/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Payeer/.gitignore +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Payeer/api.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Sber/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Sber/utils.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Tinkoff/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Volet/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Volet/_todo_req/req.mjs +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Volet/_todo_req/req.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Volet/api.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Volet/pl.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Xync/__main__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Xync/ed.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/Pms/Yandex/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/asset.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/inAgent.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/pyd.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/__init__.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/loader.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client/pm_unifier.py +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.113 → xync_client-0.0.115}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -282,7 +282,16 @@ class InAgentClient(BaseInAgentClient):
|
|
|
282
282
|
pmid=tid,
|
|
283
283
|
)
|
|
284
284
|
# обновляем остаток валюты
|
|
285
|
-
await
|
|
285
|
+
await order_db.fetch_related("cred") # todo: refact
|
|
286
|
+
await (
|
|
287
|
+
(
|
|
288
|
+
await models.Fiat.get(
|
|
289
|
+
cred__person_id=self.agent_client.actor.person_id, cred__pmcur_id=order_db.cred.pmcur_id
|
|
290
|
+
)
|
|
291
|
+
)
|
|
292
|
+
.update_from_dict({"amount": rest_amount * 100})
|
|
293
|
+
.save()
|
|
294
|
+
)
|
|
286
295
|
# отправляем продавцу чек
|
|
287
296
|
if res := self.agent_client.api.upload_chat_file(upload_file=f"tmp/{dest}.png").get("result"):
|
|
288
297
|
self.agent_client.api.send_chat_message(
|
|
@@ -340,7 +349,7 @@ async def main():
|
|
|
340
349
|
# await cl.agent_client.export_my_ads()
|
|
341
350
|
payeer_cl = Client(actor.person.user.username_id)
|
|
342
351
|
for pma in actor.person.user.pm_agents:
|
|
343
|
-
cl.pmacs[pma.pm_id] = await payeer_cl.start(await async_playwright().start(),
|
|
352
|
+
cl.pmacs[pma.pm_id] = await payeer_cl.start(await async_playwright().start(), False)
|
|
344
353
|
|
|
345
354
|
_ = await cl.start_listen()
|
|
346
355
|
await cl.agent_client.close()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
from asyncio import run
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
from decimal import Decimal
|
|
@@ -7,7 +8,7 @@ from time import sleep
|
|
|
7
8
|
|
|
8
9
|
from asyncpg.pgproto.pgproto import timedelta
|
|
9
10
|
from payeer_api import PayeerAPI
|
|
10
|
-
from playwright.async_api import async_playwright, Playwright
|
|
11
|
+
from playwright.async_api import async_playwright, Playwright, Error
|
|
11
12
|
from playwright._impl._errors import TimeoutError
|
|
12
13
|
|
|
13
14
|
from xync_client.loader import TORM
|
|
@@ -39,20 +40,23 @@ class Client(PmAgentClient):
|
|
|
39
40
|
await self.page.goto(self.pages.SEND)
|
|
40
41
|
|
|
41
42
|
async def send(self, dest: str, amount: int, cur: str) -> tuple[int, bytes, int] | int:
|
|
43
|
+
self.last_active = datetime.now()
|
|
42
44
|
page = self.page
|
|
43
45
|
if not page.url.startswith(self.pages.SEND):
|
|
44
46
|
try:
|
|
45
47
|
await page.goto(self.pages.SEND)
|
|
46
|
-
except TimeoutError:
|
|
48
|
+
except (TimeoutError, Error):
|
|
47
49
|
await login(self.agent)
|
|
48
50
|
for cookie in self.agent.state["cookies"]:
|
|
49
51
|
await page.context.add_cookies([cookie])
|
|
52
|
+
sleep(0.5)
|
|
50
53
|
await page.goto("https://payeer.com/en/account/send/")
|
|
51
54
|
fiat_accounts = await page.locator(
|
|
52
55
|
f".balance-item.balance-item--green.balance-item--{cur.lower()}"
|
|
53
56
|
).all_text_contents()
|
|
54
57
|
has_amount = float(fiat_accounts[0].replace(",", "").strip())
|
|
55
58
|
if float(amount) <= has_amount:
|
|
59
|
+
sleep(0.1)
|
|
56
60
|
await page.locator('input[name="param_ACCOUNT_NUMBER"]').fill(dest)
|
|
57
61
|
await page.locator("select[name=curr_receive]").select_option(value=cur)
|
|
58
62
|
sleep(0.9)
|
|
@@ -68,7 +72,12 @@ class Client(PmAgentClient):
|
|
|
68
72
|
await page.locator(".input4").fill(self.agent.auth.get("master_key"))
|
|
69
73
|
await page.click(".ok.button_green2")
|
|
70
74
|
sleep(1)
|
|
71
|
-
|
|
75
|
+
try:
|
|
76
|
+
await page.locator(".note_txt").wait_for(state="visible", timeout=6000)
|
|
77
|
+
except TimeoutError as _:
|
|
78
|
+
logging.error("Repeat!")
|
|
79
|
+
sleep(0.5)
|
|
80
|
+
return await self.send(dest, amount, cur)
|
|
72
81
|
if await page.locator('.note_txt:has-text("successfully completed")').count():
|
|
73
82
|
transaction = await page.locator(".note_txt").all_text_contents()
|
|
74
83
|
trans_num = int(transaction[0].replace("Transaction #", "").split()[0])
|
|
@@ -76,7 +85,7 @@ class Client(PmAgentClient):
|
|
|
76
85
|
await page.click(f".history-id-{trans_num} a.link")
|
|
77
86
|
sleep(1)
|
|
78
87
|
receipt = await page.query_selector(".ui-dialog.ui-corner-all")
|
|
79
|
-
return trans_num, await receipt.screenshot(path=f"tmp/{dest}.png"), has_amount - amount
|
|
88
|
+
return trans_num, await receipt.screenshot(path=f"tmp/{dest}.png"), int(has_amount - amount)
|
|
80
89
|
else:
|
|
81
90
|
await self.bot.send("Payeer хз", self.uid, photo=await self.page.screenshot())
|
|
82
91
|
return -1
|
|
@@ -8,7 +8,7 @@ import time
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
async def login(agent: PmAgent):
|
|
11
|
-
driver = uc.Chrome(no_sandbox=
|
|
11
|
+
driver = uc.Chrome(no_sandbox=False, headless=True)
|
|
12
12
|
wait = WebDriverWait(driver, timeout=10)
|
|
13
13
|
try:
|
|
14
14
|
driver.get("https://payeer.com/en/auth")
|
|
@@ -21,7 +21,7 @@ async def login(agent: PmAgent):
|
|
|
21
21
|
password_field.send_keys(agent.auth.get("password"))
|
|
22
22
|
login_button = wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "login-form__login-btn.step1")))
|
|
23
23
|
login_button.click()
|
|
24
|
-
time.sleep(
|
|
24
|
+
time.sleep(4)
|
|
25
25
|
login_button.click()
|
|
26
26
|
time.sleep(1)
|
|
27
27
|
if (v := driver.find_elements(By.CLASS_NAME, "form-input-top")) and v[0].text == "Введите проверочный код":
|
|
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
|