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

Installation #12

Closed
grayskripko opened this issue May 14, 2023 · 4 comments
Closed

Installation #12

grayskripko opened this issue May 14, 2023 · 4 comments

Comments

@grayskripko
Copy link

grayskripko commented May 14, 2023

Sorry for disturbing you for the second time about the similar question.
It just took me 2 days to prepare my system to use your package. Though it still not ready.
It seems the installation of undetected-chromedriver could be painful. It requires 2 files and if you haven't worked with it earlier you should somehow guess their names, versions and compability of versions. undetected-chromedriver doesn't have a good installation manual.

My current one

sudo apt-get install libc-dev

wget https://chromedriver.storage.googleapis.com/113.0.5672.63/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/
sudo chmod +x /usr/bin/chromedriver

wget dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_113.0.5672.92-1_amd64.deb
sudo dpkg -i google-chrome-stable_113.0.5672.92-1_amd64.deb

Though I'm not still sure it will work with you package. At the moment it worked for running undetected-chromedriver but I used ChromeOptions and your ChatGPT_Client doesn't allow me to do the same. I'm confused with system environments and PATH. Which of chrome files I should to specify and where.

So I ask you to consider adding my commands in case they are right and describe what environment variables and PATH additions your package expects.

@ugorsahin
Copy link
Owner

Perhaps the issue is present due to version information is hardcoded in the initialization. Try updating the version argument 112 to 113.

        self.browser = uc.Chrome(
            # driver_executable_path='/usr/bin/google-chrome',
            options=options,
            headless=headless,
            version_main=112
        )

In the meantime, I will work on a solution to solve this issue.

@grayskripko
Copy link
Author

actually, I don't understand how to use it. I mean if I create a ChatGPT_client object in order to assign a browser later, I face with the line

self.browser.get('https://chat.openai.com/auth/login?next=/chat')

that will throw an error.

At the moment, I'll try to rewrite the whole constuctor

@ugorsahin
Copy link
Owner

Do you still have any problems with this? I updated the repo with 6cde457, perhaps this can help you.

@grayskripko
Copy link
Author

grayskripko commented May 19, 2023

I used a workaround. Based on your constructor I created my own and added everything I needed.
The solution with detect_chrome_version() looks good

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

2 participants