Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USER_AGENT doesn't seem to be taken in consideration in a class #33

Open
bitcoin4cashqc opened this issue Sep 30, 2024 · 2 comments
Open

Comments

@bitcoin4cashqc
Copy link

I get :

File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\playwright\_impl\_connection.py", line 514, in wrap_api_call raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None playwright._impl._errors.Error: Page.evaluate: opts is not defined

Trying to initialize like this :

import time
from quotexapi.stable_api import Quotex
import random

USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"

class QuotexExchange:
    def __init__(self, **kwargs):
        # Initialize the Quotex client using the new library
        self.client = Quotex(
            email=kwargs.get('email'),
            password=kwargs.get('password'),
            lang=kwargs.get('lang', 'pt'),  # Language default set to Portuguese
            email_pass=kwargs.get('email_pass', kwargs.get('password')),  # Optional email pass
            user_data_dir=kwargs.get('user_data_dir', None)  # Optional browser profile path
        )
        self.client.set_session(user_agent=USER_AGENT)
        self.client.debug_ws_enable = True
        self.connected = False
        self.max_retries = int(kwargs.get('retry', 5))  # Retry attempts for connection
        self.practice = kwargs.get('practice', 'yes').lower() == 'yes'  # Practice mode
        self.otc = kwargs.get('otc', 'yes').lower() == 'yes'  # OTC mode
@bitcoin4cashqc
Copy link
Author

bitcoin4cashqc commented Oct 1, 2024

Per my research, downgrading playwright to 1.37 which also required to downgrade greenlet and other requirements made it work for me on windows 10. Issue that I faced just pip installing

I'm doing a work for someone that would prefer quotex as the exchange but this is such unreliable. I also tried this fork but it's very laggy spamming multiple trades and also sometimes it return LOSS when it's a WIN and vice-versa.

I'm willing to make this work with you guys but we gotta make this more reliable considering the goal is to make real money trading.

@bitcoin4cashqc
Copy link
Author

Also in my opinion it should not ask config just by importing from quotexapi.stable_api import Quotex

Because importing it trigger the python test.py Insira o e-mail da conta:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant