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

InstrgamBot Update #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

OsamaSaw
Copy link

hello there,
I was looking for a code to help me with something, and your code was relatively close to what I was trying to do.
so I updated your code, took some parts from it, and added them to the code I am working on.

I hope you like the new updates.

have a good day
Osama

Added a better way to handle the chromium drive
Updated all the Xpaths
Added more try blocks to prevent unnecessary crashes
@Engineervinay
Copy link
Owner

Hey @OsamaSaw , thanks for PR, but can you list out changes that you performed on code?

@OsamaSaw
Copy link
Author

Oh Hello @Engineervinay
what I did was
I added a better way to handle the chromium drive by implementing the ChromeDriverManager, by doing this no need to download the chromium and declaring the path, the ChromeDriverManager will do all this as you can see in line 55

I updated the deprecated functions from selenium and all the Xpaths and selectors

I added more try blocks to prevent unnecessary crashes sometimes the "not now button" doesn't always show up and the page sometimes takes too much to load or just lags, so these blocks prevent such crashes.

I removed most of the Sleep functions and replace them with "DriverWait Until EC.presence_of_element_located" there is no need to wait 20 sec if the element is located after 3, of course, I added a fallback with is max of 20 sec. ✌

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.

2 participants