My dad runs a business and has a specific wholesale website he goes to, but I've noticed when he's buying disposable vapes, he has to click on each vape and then look at the stock of each flavor of that vape. I'd like to create a program which prints out the stock of every flavor for every disposable vape. So far, I go to the URL for each vape and then inspect the table which shows the stock of the different flavors and print that table out. But, I don't want to enter the specific URL for every single vape then type print for every single stock table. Is there a cleaner way to just use the URL for the page that lists all the disposable vapes using ""driver.get('https://safagoods.com/vape-shop/disposable-vape-devices/')"" and then from there click on all the different vapes and print out their stock table? Sorry if this is a confusion question. Hopefully if my code is ran it explains it a bit better:
from selenium import webdriver
import time
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.set_window_size(2000,1000)
driver.get('https://safagoods.com/vape-shop/disposable-vape-devices/huge-disposables')
HUGE_vape = driver.find_element_by_id('input-option2231')
print(HUGE_vape.text)
driver.get('https://safagoods.com/vape-shop/disposable-vape-devices/kangvape-onee-max-disposables')
KANG_vape = driver.find_element_by_id('input-option2228')
print(KANG_vape.text)
driver.get('https://safagoods.com/vape-shop/disposable-vape-devices/art-x-disposables')
ART_vape = driver.find_element_by_id('input-option2196')
print(ART_vape.text)
driver.close()
I have three vapes so far but there are 57 different ones and sometimes they update the merchandise. Instead of typing the information for every single vape, I'd like to know if there's a way to start on the initial disposable vape page I posted above and print out the stock of all available vapes. If there isn't I'm OK with typing them all out, just curious to see if there's a better option.