xync-client 0.0.107__tar.gz → 0.0.110__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.107/xync_client.egg-info → xync_client-0.0.110}/PKG-INFO +2 -1
- {xync_client-0.0.107 → xync_client-0.0.110}/pyproject.toml +1 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/InAgent.py +9 -9
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Payeer/__init__.py +16 -12
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Payeer/login.py +9 -24
- {xync_client-0.0.107 → xync_client-0.0.110/xync_client.egg-info}/PKG-INFO +2 -1
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client.egg-info/requires.txt +1 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/.env.sample +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/.gitignore +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/README.md +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/makefile +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/setup.cfg +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/TestAgent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/TestAsset.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/TestEx.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/TestOrder.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Binance/test_binance.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Gate/test_gate.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Wallet/test_agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/Wallet/test_ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/tests/_todo_refact/_test_ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Asset.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/BaseTest.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Exception.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/InAgent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/PmAgent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Abc/xtype.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BitGet/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/BitPapa/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/etype/cred.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/etype/order.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/order.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Bybit/ws.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Gate/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Gate/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Gmail/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/etype/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/etype/cred.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/etype/test.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/KuCoin/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/KuCoin/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/KuCoin/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Mexc/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Mexc/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Mexc/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Okx/etype/ad.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Okx/etype/pm.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/.gitignore +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Alfa/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Alfa/state.json +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/MTS/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Ozon/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Payeer/.gitignore +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Payeer/api.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Sber/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Sber/utils.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Tinkoff/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Volet/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Volet/_todo_req/req.mjs +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Volet/_todo_req/req.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Volet/api.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Volet/pl.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Xync/__main__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Xync/ed.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/Pms/Yandex/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/asset.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/inAgent.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/pyd.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/__init__.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/loader.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client/pm_unifier.py +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.107 → xync_client-0.0.110}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xync-client
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.110
|
|
4
4
|
Author-email: Mike Artemiev <mixartemev@gmail.com>
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/XyncNet/client
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/XyncNet/client
|
|
@@ -14,6 +14,7 @@ Requires-Dist: python-binance
|
|
|
14
14
|
Requires-Dist: pybit
|
|
15
15
|
Requires-Dist: pyotp
|
|
16
16
|
Requires-Dist: kurigram
|
|
17
|
+
Requires-Dist: playwright
|
|
17
18
|
Requires-Dist: python-dotenv
|
|
18
19
|
Requires-Dist: python-okx
|
|
19
20
|
Requires-Dist: pyrogram-client
|
|
@@ -126,7 +126,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
126
126
|
addr__coin_id=order_db.ad.pair_side.pair.coin_id,
|
|
127
127
|
addr__actor=self.agent_client.actor,
|
|
128
128
|
)
|
|
129
|
-
ass.free -=
|
|
129
|
+
ass.free -= int(order_db.amount / order_db.ad.price)
|
|
130
130
|
await ass.save(update_fields=["free"])
|
|
131
131
|
# обновляем остаток валюты
|
|
132
132
|
fiat = await models.Fiat.get(cred_id=order_db.cred_id)
|
|
@@ -247,7 +247,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
247
247
|
async def send_payment(self, order_db: models.Order, dest):
|
|
248
248
|
if order_db.status not in (OrderStatus.created, OrderStatus.requested):
|
|
249
249
|
return
|
|
250
|
-
|
|
250
|
+
fmt_am = round(order_db.amount * 10**-2, 2)
|
|
251
251
|
pma, cur = await self.get_pma_by_pmex(order_db)
|
|
252
252
|
async with in_transaction():
|
|
253
253
|
# отмечаем ордер на бирже "оплачен"
|
|
@@ -259,9 +259,9 @@ class InAgentClient(BaseInAgentClient):
|
|
|
259
259
|
paymentId=str(credex.exid), # credex.exid
|
|
260
260
|
)
|
|
261
261
|
# проверяем не отправляли ли мы уже перевод по этому ордеру
|
|
262
|
-
if t := await models.Transfer.get_or_none(order=order_db, amount=
|
|
263
|
-
await pma.bot.send(f"Order# {order_db.exid}: Double send {
|
|
264
|
-
raise Exception(f"Order# {order_db.exid}: Double send {
|
|
262
|
+
if t := await models.Transfer.get_or_none(order=order_db, amount=order_db.amount):
|
|
263
|
+
await pma.bot.send(f"Order# {order_db.exid}: Double send {fmt_am}{cur} to {dest} #{t.pmid}!")
|
|
264
|
+
raise Exception(f"Order# {order_db.exid}: Double send {fmt_am}{cur} to {dest} #{t.pmid}!")
|
|
265
265
|
|
|
266
266
|
# ставим в бд статус "оплачен"
|
|
267
267
|
order_db.status = OrderStatus.paid
|
|
@@ -271,13 +271,13 @@ class InAgentClient(BaseInAgentClient):
|
|
|
271
271
|
ass = await models.Asset.get(
|
|
272
272
|
addr__coin_id=order_db.ad.pair_side.pair.coin_id, addr__actor=self.agent_client.actor
|
|
273
273
|
)
|
|
274
|
-
ass.free +=
|
|
274
|
+
ass.free += int(order_db.amount / order_db.ad.price)
|
|
275
275
|
await ass.save(update_fields=["free"])
|
|
276
276
|
# отправляем деньги
|
|
277
|
-
tid, img, rest_amount = await pma.send(dest=dest, amount=
|
|
277
|
+
tid, img, rest_amount = await pma.send(dest=dest, amount=fmt_am, cur=cur)
|
|
278
278
|
# создаем перевод в бд
|
|
279
279
|
t, _ = await models.Transfer.update_or_create(
|
|
280
|
-
{"amount":
|
|
280
|
+
{"amount": order_db.amount},
|
|
281
281
|
order=order_db,
|
|
282
282
|
pmid=tid,
|
|
283
283
|
)
|
|
@@ -288,7 +288,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
288
288
|
self.agent_client.api.send_chat_message(
|
|
289
289
|
orderId=str(order_db.exid), contentType="pic", message=res["url"], msgUuid=uuid4().hex
|
|
290
290
|
)
|
|
291
|
-
logging.info(f"Order {order_db.exid} PAID at {datetime.now()}: {
|
|
291
|
+
logging.info(f"Order {order_db.exid} PAID at {datetime.now()}: {fmt_am}!")
|
|
292
292
|
|
|
293
293
|
async def get_pma_by_cdex(self, order: OrderFull) -> tuple[PmAgentClient | None, CredEx] | None:
|
|
294
294
|
cdxs = await models.CredEx.filter(
|
|
@@ -56,16 +56,20 @@ class Client(PmAgentClient):
|
|
|
56
56
|
if float(amount) <= has_amount:
|
|
57
57
|
await page.locator('input[name="param_ACCOUNT_NUMBER"]').fill(dest)
|
|
58
58
|
await page.locator("select[name=curr_receive]").select_option(value=cur)
|
|
59
|
+
sleep(0.5)
|
|
59
60
|
await fill_amount(page.locator('input[name="sum_receive"]'), str(amount))
|
|
60
|
-
await page.wait_for_selector(".btn.n-form--btn.n-form--btn-mod", state="visible")
|
|
61
|
+
await page.wait_for_selector(".btn.n-form--btn.n-form--btn-mod", state="visible", timeout=3000)
|
|
62
|
+
sleep(1.5)
|
|
61
63
|
await click_send(page.locator(".btn.n-form--btn.n-form--btn-mod:not(.repeat)"))
|
|
62
|
-
await page.locator(".note_txt").wait_for(state="visible")
|
|
64
|
+
await page.locator(".note_txt").wait_for(state="visible", timeout=6000)
|
|
63
65
|
if await page.locator('.note_txt:has-text("successfully completed")').count():
|
|
64
66
|
transaction = await page.locator(".note_txt").all_text_contents()
|
|
65
67
|
trans_num = int(transaction[0].replace("Transaction #", "").split()[0])
|
|
66
68
|
await page.goto("https://payeer.com/ru/account/history/")
|
|
69
|
+
sleep(1.5)
|
|
67
70
|
await page.click(f".history-id-{trans_num} a.link")
|
|
68
|
-
await page.wait_for_selector(".ui-dialog.ui-corner-all", state="visible")
|
|
71
|
+
await page.wait_for_selector(".ui-dialog.ui-corner-all", state="visible", timeout=5000)
|
|
72
|
+
sleep(1)
|
|
69
73
|
receipt = await page.query_selector(".ui-dialog.ui-corner-all")
|
|
70
74
|
return trans_num, await receipt.screenshot(path=f"tmp/{dest}.png"), has_amount
|
|
71
75
|
else:
|
|
@@ -81,7 +85,7 @@ class Client(PmAgentClient):
|
|
|
81
85
|
raise Exception(f"Need {amount}{cur}, but has only {has_amount}")
|
|
82
86
|
|
|
83
87
|
def check_in(
|
|
84
|
-
self, amount: Decimal | int | float, cur: str,
|
|
88
|
+
self, amount: Decimal | int | float, cur: str, tme: datetime = None, tid: str | int = None
|
|
85
89
|
) -> tuple[Decimal | None, int | None]:
|
|
86
90
|
history = self.api.history(type="incoming", append=tid, count=3)
|
|
87
91
|
if tid:
|
|
@@ -92,7 +96,7 @@ class Client(PmAgentClient):
|
|
|
92
96
|
if (
|
|
93
97
|
amount <= Decimal(h["creditedAmount"]) <= ceil(amount)
|
|
94
98
|
and h["creditedCurrency"] == cur
|
|
95
|
-
and datetime.fromisoformat(h["date"]) >
|
|
99
|
+
and datetime.fromisoformat(h["date"]) > tme - timedelta(minutes=1)
|
|
96
100
|
)
|
|
97
101
|
]
|
|
98
102
|
if not (t := t and t[0]):
|
|
@@ -107,7 +111,7 @@ class Client(PmAgentClient):
|
|
|
107
111
|
async def fill_amount(loc: Locator, amount: str):
|
|
108
112
|
await loc.wait_for(state="visible")
|
|
109
113
|
await loc.fill(amount)
|
|
110
|
-
sleep(
|
|
114
|
+
sleep(2)
|
|
111
115
|
if await loc.input_value() != amount or await loc.input_value() != amount:
|
|
112
116
|
logging.warning("Fill amount repeated!")
|
|
113
117
|
await fill_amount(loc, amount)
|
|
@@ -115,16 +119,16 @@ async def fill_amount(loc: Locator, amount: str):
|
|
|
115
119
|
...
|
|
116
120
|
|
|
117
121
|
|
|
118
|
-
async def click_send(
|
|
119
|
-
if await
|
|
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)
|
|
122
126
|
try:
|
|
123
|
-
await
|
|
127
|
+
await loc1.wait_for(state="hidden", timeout=2000 * count)
|
|
124
128
|
except TimeoutError:
|
|
125
129
|
if count < 4:
|
|
126
130
|
logging.warning("Click repeated!")
|
|
127
|
-
await click_send(
|
|
131
|
+
await click_send(loc1, count + 1)
|
|
128
132
|
else:
|
|
129
133
|
raise TimeoutError
|
|
130
134
|
|
|
@@ -1,51 +1,36 @@
|
|
|
1
|
-
from time import sleep
|
|
2
|
-
|
|
3
1
|
from selenium.webdriver.common.by import By
|
|
4
2
|
import undetected_chromedriver as uc
|
|
5
3
|
from xync_schema.models import PmAgent
|
|
6
4
|
from selenium.webdriver.support.ui import WebDriverWait
|
|
7
5
|
from selenium.webdriver.support import expected_conditions as EC
|
|
8
6
|
from selenium.webdriver.common.action_chains import ActionChains
|
|
7
|
+
import time
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
async def login(agent: PmAgent):
|
|
12
|
-
driver = uc.Chrome(no_sandbox=True)
|
|
11
|
+
driver = uc.Chrome(no_sandbox=True, headless=False)
|
|
13
12
|
wait = WebDriverWait(driver, timeout=10)
|
|
14
13
|
try:
|
|
15
|
-
driver.get("https://payeer.com/
|
|
14
|
+
driver.get("https://payeer.com/en/auth")
|
|
16
15
|
wait.until(EC.invisibility_of_element_located((By.TAG_NAME, "lottie-player")))
|
|
17
16
|
login_link = wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "button.button_empty")))
|
|
18
|
-
|
|
19
|
-
login_link.click()
|
|
20
|
-
except Exception:
|
|
21
|
-
driver.execute_script("arguments[0].click();", login_link)
|
|
17
|
+
login_link.click()
|
|
22
18
|
email_field = wait.until(EC.presence_of_element_located((By.NAME, "email")))
|
|
23
19
|
email_field.send_keys(agent.auth.get("email"))
|
|
24
20
|
password_field = wait.until(EC.presence_of_element_located((By.NAME, "password")))
|
|
25
21
|
password_field.send_keys(agent.auth.get("password"))
|
|
26
22
|
login_button = wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "login-form__login-btn.step1")))
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
driver.execute_script("arguments[0].click();", login_button)
|
|
32
|
-
try:
|
|
33
|
-
login_button = wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "login-form__login-btn.step1")))
|
|
34
|
-
driver.execute_script("arguments[0].click();", login_button)
|
|
35
|
-
except Exception:
|
|
36
|
-
pass
|
|
23
|
+
login_button.click()
|
|
24
|
+
time.sleep(5)
|
|
25
|
+
login_button.click()
|
|
26
|
+
time.sleep(1)
|
|
37
27
|
if (v := driver.find_elements(By.CLASS_NAME, "form-input-top")) and v[0].text == "Введите проверочный код":
|
|
38
28
|
code = input("Email code: ")
|
|
39
29
|
actions = ActionChains(driver)
|
|
40
30
|
for char in code:
|
|
41
31
|
actions.send_keys(char).perform()
|
|
42
32
|
step2_button = wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "login-form__login-btn.step2")))
|
|
43
|
-
|
|
44
|
-
step2_button.click()
|
|
45
|
-
except Exception:
|
|
46
|
-
driver.execute_script("arguments[0].click();", step2_button)
|
|
47
|
-
|
|
48
|
-
sleep(1)
|
|
33
|
+
step2_button.click()
|
|
49
34
|
agent.state = {"cookies": driver.get_cookies()}
|
|
50
35
|
await agent.save()
|
|
51
36
|
finally:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xync-client
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.110
|
|
4
4
|
Author-email: Mike Artemiev <mixartemev@gmail.com>
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/XyncNet/client
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/XyncNet/client
|
|
@@ -14,6 +14,7 @@ Requires-Dist: python-binance
|
|
|
14
14
|
Requires-Dist: pybit
|
|
15
15
|
Requires-Dist: pyotp
|
|
16
16
|
Requires-Dist: kurigram
|
|
17
|
+
Requires-Dist: playwright
|
|
17
18
|
Requires-Dist: python-dotenv
|
|
18
19
|
Requires-Dist: python-okx
|
|
19
20
|
Requires-Dist: pyrogram-client
|
|
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
|