Skip to content

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. ✌

@duraki
Copy link

duraki commented Feb 25, 2025

Looks like a great addition. WDYT about merge @Engineervinay?

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