Created
April 29, 2019 16:56
-
-
Save paramaggarwal/48a980dc4099253789c486bb401911f4 to your computer and use it in GitHub Desktop.
Download Swiggy invoices from Orders page
This file contains 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
/* | |
* 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 the getElementsByClassName('_2uT6l')
section might have changed - can you check what it is now?
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
The invoice URL doesn't work anymore. Looks like sending an email support@swiggy.com is our best bet.