Last active
January 15, 2019 15:46
-
-
Save avinayak/d150111ecfdb65a669a4b17a78abeebd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//go to swiggy.com | |
//log in | |
//press F12 on home page | |
//paste the script given below in console and press enter | |
//all_orders object will be populated with all your swiggy order data | |
all_orders=[] | |
recfetch = (oid)=>{ | |
fetch('https://www.swiggy.com/dapi/order/all?order_id='+oid) | |
.then((resp) => resp.json()) | |
.then((or)=>{ | |
all_orders.push(...or.data.orders) | |
var loworder = Math.min(...or.data.orders.map(x=>parseInt(x.order_id))); | |
console.log(loworder); | |
recfetch(loworder); | |
}) | |
.catch(()=>{ | |
console.log('completed') | |
console.log(all_orders) | |
}) | |
} | |
recfetch(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment