Skip to content

Instantly share code, notes, and snippets.

@paramaggarwal
Created April 29, 2019 16:56
Show Gist options
  • Save paramaggarwal/48a980dc4099253789c486bb401911f4 to your computer and use it in GitHub Desktop.
Save paramaggarwal/48a980dc4099253789c486bb401911f4 to your computer and use it in GitHub Desktop.
Download Swiggy invoices from Orders page
/*
* Make sure to alow popups so that the invoices can be downloaded.
* Run this in the browser console.
* In case the class name for the div changes, inspect and update.
*/
Array
.from(document.getElementsByClassName('_2uT6l'))
.map((el)=>el.innerText.match(/#([0-9]+)/)[1])
.map((num)=>"https://www.swiggy.com/invoice/download/"+num)
.forEach((url)=>{window.open(url,'_blank');})
@ritfiz
Copy link

ritfiz commented Jan 3, 2022

The invoice URL doesn't work anymore. Looks like sending an email support@swiggy.com is our best bet.

@paramaggarwal
Copy link
Author

paramaggarwal commented Jan 3, 2022

@ritfiz the getElementsByClassName('_2uT6l') section might have changed - can you check what it is now?

@shashank60
Copy link

shashank60 commented Jun 8, 2023

Did anyone manage to get the data in CSV or JSON format ? If yes , please give a blog link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment