This doesn't actually work unless you're logged in. The result of the Ajax request is always this:
{ "errorCode": null, "errorMessage": "2-Day Delivery is currently not available in your area. Please visit your nearest <a href=\"/warehouse-locations\" class=\"body-copy-link\">Costco Warehouse</a> or visit our <a href=\"https://www.costco.com\" class=\"body-copy-link\">Grocery FAQs</a> for more information.", "errorMessageKey": "ERR_ZIP_NOTVALID", "errorMessageParam": null, "correctiveActionMessage": "", "correlationIdentifier": "-106cc8ca:18e3443e920:-1046", "exceptionData": { "Reason": "ZipCode is null or empty" }, "exceptionType": "0", "originatingCommand": "", "systemMessage": "" }
- Get code
git clone https://github.com/loganmarchione/costco-pm-checker.git cd costco-pm-checker - Install Python requirements
python3 -m venv venv source venv/bin/activate pip3 install -r requirements.txt - Make any changes you want to
URLs.txt - Run the Python script
python3 bot.py
This is a personal project that is not monetized. It is not endorsed by or affiliated with Costco in any way, and it is most definitely against Costco's terms of service.