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
// use nodejs to run this :) | |
// login to emag with a browser, find a req, copy the value of the cookie header here | |
const COOKIE_VAL = "FILL_ME_BABY" | |
const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"; | |
const API_URL = "https://www.emag.ro/history/shopping/{pageNo}?source=front&time=older"; | |
fetchAllOrders().then(allOrders => { | |
let total = 0; |