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

disconnected: unable to connect to renderer #180

Open
uelquis opened this issue Jan 4, 2024 · 0 comments
Open

disconnected: unable to connect to renderer #180

uelquis opened this issue Jan 4, 2024 · 0 comments

Comments

@uelquis
Copy link

uelquis commented Jan 4, 2024

When I try to get user info, it throws this error. I don't know why it can't connect to the renderer

import flask
from Scweet.user import get_user_information
from selenium import webdriver

from selenium.webdriver import ChromeOptions
def init(app: flask.app.Flask):

    options = ChromeOptions()
    options.add_argument("--headless")
    options.add_argument("--remote-debugging-port=5000")

    @app.route("/user/<string:username>")
    def user(username):

        data = get_user_information(
            users=[username],
            driver=webdriver.Chrome(options=options)
        )
        return f'hello {data}'
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