leningangwal / big-basket-delivery-slots Goto Github PK
View Code? Open in Web Editor NEWAutomates the process of finding delivery slots in BigBasket during the Covid-19 chaos.
Automates the process of finding delivery slots in BigBasket during the Covid-19 chaos.
This particular line in the code doesn't seem to be a good check to see if slots are available
Big-Basket-Delivery-Slots/BB_slot.py
Line 25 in 0e2a5c3
I've been running this script for a while, and finally the page redirected to https://www.bigbasket.com/co/checkout/?x=0&spni=21&addr=someid which according to the code indicates that slots are open, but the page instead showed this error:
So this if
condition doesn't seem to work. Is there a better check that can be done? I haven't had a successful order on Big basket so I don't what a good check would be.
Hey buddy, sorry to disturb but I dont know much about coding, although if you could give me steps to run this script on windows it would be really helpful to all those indians with no coding bg like me would be able to use the script. Thank you!
Hi, Keep getting following error whenever running on Mac
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1319, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1004, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 944, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1399, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "BB_slot.py", line 52, in
main()
File "BB_slot.py", line 49, in main
get_bb_slot('https://www.bigbasket.com/basket/?ver=1')
File "BB_slot.py", line 10, in get_bb_slot
chromedriver_autoinstaller.install()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chromedriver_autoinstaller/init.py", line 15, in install
chromedriver_filepath = utils.download_chromedriver(cwd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chromedriver_autoinstaller/utils.py", line 165, in download_chromedriver
chromedriver_version = get_matched_chromedriver_version(chrome_version)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chromedriver_autoinstaller/utils.py", line 131, in get_matched_chromedriver_version
doc = urllib.request.urlopen('https://chromedriver.storage.googleapis.com').read()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1362, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1322, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.