A small script to retrieve Name, Price/Sale, and Time information from Humble Bundle store links for use in 🤖 or web-hooks using selenium.
yarn install # install dependencies
Getting the time left for a promotion
import webscraper
page = webscraper.Page("https://www.humblebundle.com/store/LIMITED_TIME_OFFER_PAGE")
timer = page.get_time_left()
# >> ('1 days 16 hours 46 mins 56 secs',
# {'days': '1', 'hours': '16', 'mins': '46', 'secs': '56'})
Getting a product's name
import webscraper
page = webscraper.Page("https://www.humblebundle.com/store/PRODUCT_PAGE")
name = page.get_product_name()
# >> DOOM®
Getting a product's price information
import webscraper
page = webscraper.Page("https://www.humblebundle.com/store/PRODUCT_PAGE")
name = page.get_price_data()
# On sale
# >> {'price_preview': '$14.99 USD', 'price_full': '$24.99', 'price_currency': 'USD', 'price': '14.99', 'price_modifier': '-40%', 'availability': 'InStock'}
# Limited Free offer
# >> {'price_preview': 'FREE!', 'price_full': '$14.99', 'price_currency': 'USD', 'price': '0', 'price_modifier': '-100%', 'availability': 'InStock'}
- Building a Web Scraper from start to finish - Basics of Python-based web-scraping.
MIT © Nicholas Adamou