mr-karan / swiggy-analytics

Analyse your swiggy orders 🍔
MIT License
270 stars 37 forks source link

Not fetching full history #7

Open nishanthvijayan opened 4 years ago

nishanthvijayan commented 4 years ago

I've been using swiggy for more than a year, but the tool only picked the last 35 or so orders whereas the total order count should've been well above 200. Maybe the API now returns paginated data?

aashutoshrathi commented 4 years ago

Same here something like this is happening with me. It says fetching 999 orders and then quietly returns 71.

image

mr-karan commented 4 years ago

I'll look into this coming weekend probably. Thanks for reporting. If you'd like to poke around the codebase, feel free to.

mr-karan commented 4 years ago

So, looks like Swiggy has started to limit the full history from the API, the total number of orders are now capped to 999.

image

Since the data from the API (and the web) itself isn't available I don't think there's much we can do about it. I can probably write a weekly exporter which runs as a cron job to fetch week orders and store the data but the object in it's current form won't have much use. A bit disappointed but I guess we have to live with it.

Thanks for using this project, I'll try to write the exporter soon :smile:

soumendrak commented 2 years ago

I am getting this error: image

shahidcodes commented 1 year ago

for me, it's only giving 344, with the message to use the App for full history.

image

@mr-karan possible to extract apis from the app?

SurajBhari commented 5 months ago

the limit is in last 1 year and not any arbitrary number

SurajBhari commented 5 months ago

what you can possibly do is look into the internal api for swiggy app. using something like mitmproxy and get it to fetch older orders ? possible ? the app uses certificate pinning so you have to patch the apk with apk-mitm in meantime i will try to do it in my meantime.