Skip to main content

A simple (unofficial) Zomato Partner API client library & CLI

Project description

Zotcher

GitHub top language GitHub Code style: black

made with ❤️ by mentix02

A simple (unofficial) Zomato™ Partner API client library & CLI.

Note: Zotcher is in no way affiliated with Zomato™ or any of its subsidiaries. All trademarks are the property of their respective owners. The project itself is licensed under the GPLv3 license.

Installation

pip install zotcher

Etymology

Important things first.

Zomato™ + fetcher = Zotcher

Motivation

Zomato™ devs were too incompetent to provide order items in their CSV exports and after tearing my hair out by scraping their dashboard via client side Javascript, it became readily apparent that hacking around their private API would be far easier than sitting around and praying for them do the sensible thing. So I did.

Config & Usage

Zotcher was built with convention over configuration in mind. All that is required by the user is the Node.js fetch call to fetch-orders-by-states that can be grabbed from Chrome's Network tab in it's developer tools.

  1. Open up the Zomato Partner Dashboard in Chrome.
  2. Open the developer tools (F12). Click on "Network".
  3. Right click fetch-orders-by-states and select "Copy" -> "Copy as Node.js fetch". Copy Node.js fetch
  4. Paste the copied code into a file, e.g. fetch.js.
  5. Run the config command to generate a config file. This should create a config.json file.
$ zotcher.py config fetch.js
  1. Fetch the orders using the fetch command.
$ zotcher.py fetch orders.json

This should save the orders from the past 10 days to orders.json. You can go further by tweaking the flags of the fetch command. Enjoy!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zotcher-0.0.3.tar.gz (20.6 kB view hashes)

Uploaded Source

Built Distribution

zotcher-0.0.3-py3-none-any.whl (21.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page