Skip to content

Commit

Permalink
fix: Fix typo and translation
Browse files Browse the repository at this point in the history
Fixed typos and translations in the qxbroker.py and stable_api.py files
  • Loading branch information
SantiiRepair committed Dec 15, 2023
1 parent 2eb3a30 commit 3740c07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 350 deletions.
11 changes: 5 additions & 6 deletions quotexpy/http/qxbroker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import re
import sys
import json
import requests
import sys
from pathlib import Path
from bs4 import BeautifulSoup
from typing import Tuple, Any
from quotexpy.exceptions import QuotexAuthError
from quotexpy.utils.playwright_install import install
from playwright.async_api import Playwright, async_playwright

Expand All @@ -31,9 +32,8 @@ async def run(self, playwright: Playwright) -> Tuple[Any, str]:
await page.wait_for_timeout(15000)
soup = BeautifulSoup(await page.content(), "html.parser")
if "Insira o código PIN que acabamos de enviar para o seu e-mail" in soup.get_text():
code = input("Insira o código PIN que acabamos de enviar para o seu e-mail: ")
"""await page.evaluate(
f'() => {{ document.querySelector("input[name=\\"code\\"]").value = {int(code)}; }}')"""
code = input("Enter the PIN code we just sent to your email: ")
# await page.evaluate(f'() => {{ document.querySelector("input[name=\\"code\\"]").value = {int(code)}; }}')
await page.get_by_placeholder("Digite o código de 6 dígitos...").click()
await page.get_by_placeholder("Digite o código de 6 dígitos...").fill(code)
await page.get_by_role("button", name="Entrar").click()
Expand All @@ -48,8 +48,7 @@ async def run(self, playwright: Playwright) -> Tuple[Any, str]:
try:
script = soup.find_all("script", {"type": "text/javascript"})[1].get_text()
except:
print("Erro ao carregar script. verifique se o usuário e senha estão corretos?")
print("Error loading script. check if the username and password are correct?")
raise QuotexAuthError("check if the username and password are correct")
sys.exit(1)
match = re.sub("window.settings = ", "", script.strip().replace(";", ""))

Expand Down
344 changes: 0 additions & 344 deletions quotexpy/stable_api.py

This file was deleted.

0 comments on commit 3740c07

Please sign in to comment.