Skip to content

Instantly share code, notes, and snippets.

@heypoom
Created January 3, 2021 09:51
Show Gist options
  • Save heypoom/5160e2cc1140ce2efece9a41eedf481e to your computer and use it in GitHub Desktop.
Save heypoom/5160e2cc1140ce2efece9a41eedf481e to your computer and use it in GitHub Desktop.
const getShopeeOrderData = () => [...document.querySelectorAll('.order-card__container')].map(node => ({
name: node.querySelector('.order-content__item__name').innerText,
price: parseInt(node.querySelector('.purchase-card-buttons__total-price').innerText.slice(1).replaceAll(',', '')),
orderURL: node.querySelector('.order-content__item-wrapper').href
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment