Last active
April 7, 2024 14:02
-
-
Save jrandiny/4fa5d382f867a2e6fc35f7d89c8a1c98 to your computer and use it in GitHub Desktop.
Generate humble bundle tier list (only tested using usd and english language)
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
| function generateTierSummary() { | |
| const tierList = document.querySelectorAll(".tier-item-details-view"); | |
| const output = Array.from(tierList).map((entry)=>{ | |
| const title = entry.querySelector(".heading-medium").textContent; | |
| const rawPrice = entry.querySelector(".tier-price").textContent.trim(); | |
| const price = rawPrice.match(/\d+/)[0]; | |
| return `${price} | ${title}` | |
| }); | |
| console.log(output.join("\n")); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this script you can easily compare the content of each tier and decide which tier is the best for you
Example
Page: https://www.humblebundle.com/games/virtual-realities-mystery-mayhem
Output: