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

Switch to Chrome to avoid 429s #29

Merged
merged 2 commits into from
May 25, 2021
Merged

Switch to Chrome to avoid 429s #29

merged 2 commits into from
May 25, 2021

Conversation

mod242
Copy link
Contributor

@mod242 mod242 commented May 25, 2021

Switch to chrome-stable and make chromedriver dynamic to installed chrome-version.
This solves shadow-bans for me on docker and should be future-proof, becuase the correct chrome-driver is evaluated by installed google-chrome.

mod242 added 2 commits May 24, 2021 15:07
Fixes ShadowBans (429s) for my environment
@J0ekr
Copy link

J0ekr commented May 25, 2021

I'm not able to build the docker image for this repo with the following error.

E: Unable to locate package google-chrome-stable

Removing intermediate container ef8096c6ff01

ERROR: Service 'impf-botpy' failed to build : The command '/bin/sh -c wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&     apt-get update -y &&     apt-get install -y google-chrome-stable &&     CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") &&     DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") &&     wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" &&     unzip /chromedriver/chromedriver* -d /usr/local/bin &&     rm -r -f /chromedriver/' returned a non-zero code: 100

As there are multiple things happening in this command I cant really check where the error lies.

@mod242
Copy link
Contributor Author

mod242 commented May 25, 2021

What platform do you try to build on? Seems like the build process can't find the google chrome package (which works on my x86_64)

@J0ekr
Copy link

J0ekr commented May 25, 2021

On a raspberry pi, so there might be no arm version for google-chrome-stable - didn't think about that.

@mod242
Copy link
Contributor Author

mod242 commented May 25, 2021

Just checked, that's the reason :-( Have no idea how to easly come around this

@alfonsrv
Copy link
Owner

Can confirm this fixes it. Merging to main.

Thanks for contributing @mod242

@alfonsrv alfonsrv merged commit ee494d0 into alfonsrv:main May 25, 2021
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

Successfully merging this pull request may close these issues.

3 participants