LeninGangwal / Big-Basket-Delivery-Slots

Automates the process of finding delivery slots in BigBasket during the Covid-19 chaos.
41 stars 16 forks source link

It should stop reloading the page once user goes to payment page #9

Open GorvGoyl opened 4 years ago

GorvGoyl commented 4 years ago

Thanks for your efforts! Was able to order within 5 minutes :) Now, Once I see that slot is available and click on pay now button, your script still loads the screen :( due to which payment get stuck and need to pay later after bb notification that payment was unsuccessful. Can we stop reloading the page if user goes to payment page?

nileshjha19 commented 4 years ago

Yes. If we go by the bigbasket rules, we are anyway allowed only one active order at a time. After the slots are found, you can break out of the while loop and run the application again for the next day. Something like this:

if "checkout" in driver.current_url and not "Unfortunately, we do not have" in src: printTime("Found the slots!") notify("Slots Available!","Please go and choose the slots") break