Created
May 23, 2018 10:30
-
-
Save Mewp/abb0e4a7c9c7fa2b322430b55dd45222 to your computer and use it in GitHub Desktop.
Extract tracking numbers from aliexpress' orders list
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
// Paste this into dev console at order page | |
window.abajarr = []; | |
var elems = Array.prototype.slice.call(document.querySelectorAll('.order-info .first-row .info-body')) | |
function abaj(data) { | |
abajarr.push(data.tracking[0].mailNo); | |
if(abajarr.length == elems.length) | |
console.log(abajarr.join(" ")); | |
} | |
elems.forEach((e) => { | |
let script = document.createElement("script"); | |
script.src = "https://ilogisticsaddress.aliexpress.com/ajax_logistics_track.htm?callback=abaj&orderId=" + e.textContent; document.body.appendChild(script); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment