Skip to content

Instantly share code, notes, and snippets.

@heypoom
Last active September 18, 2023 15:22
Show Gist options
  • Save heypoom/33d3578ceeabb15a3040fd9079564f37 to your computer and use it in GitHub Desktop.
Save heypoom/33d3578ceeabb15a3040fd9079564f37 to your computer and use it in GitHub Desktop.
// First, go to https://shopee.co.th/user/purchase, and open DevTools.
// Step 1 - Run this code to scroll all the way to the bottom.
const timer = setInterval(() => scrollTo(0, 10000000), 800)
setTimeout(() => {
// Step 2 - Stop scrolling after 1 minute.
clearInterval(timer)
// Step 3 - Sum the total purchase price!
const total = [...document.querySelectorAll('.purchase-card-buttons__total-price')]
.map(n => parseInt(n.innerText.slice(1).replace(/,/g, '')))
.reduce((a, b) => a + b)
console.log('Total =', total)
}, 60 * 1000)
@jukbot
Copy link

jukbot commented Aug 16, 2021

กลับมาดู script shopee ควรทำ BI analytics การซื้อของแต่ละคน 😂

@chino-pack
Copy link

ไม่ทราบว่าตอนนี้ element's classname ถูกเปลี่ยนอีกแล้วหรอครับ ใช้โค้ดข้างบนแล้วรันไม่ได้

@wit03
Copy link

wit03 commented Sep 25, 2021

@PackChinoros ใช่ครับ ตอนนี้เปลี่ยนจาก ".isoXOF" เป็น "._1MS3t2" ได้เลยครับ

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