I want to filter the Innovfest x Elevating Founders (Startup/Scaleup) category and scrape all the exhibitor names and booth number from here: https://asiatechxsg.com/exhibitors/
However, when I run my scrapper, it scrapes all exhibitors (without filtering) instead.
# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
exhibitor_names = []
exhibitor_booth = []
driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://asiatechxsg.com/exhibitors/")
wait = WebDriverWait(driver, 10)
wait.until(EC.frame_to_be_available_and_switch_to_it((By.CLASS_NAME, "IframeModule_iframe__JCvXg")))
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
match=False
while(match==False):
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
last_element = driver.find_elements(By.XPATH, "//img[@alt='Singapore Centre for Social Enterprise, raiSE Ltd']")
if (len(last_element) >= 1):
match=True
# Get names
names = wait.until(EC.visibility_of_all_elements_located((By.XPATH, "//span[@class='sc-a13c392f-0 sc-85df61db-4 feepZZ eErKol']")))
print("No. of sponsors and exhibitors= " + str(len(names)))
for name in names:
exhibitor_names.append(name.text)
This is what I have currently. How do I make it such that it scrapes only the filtered exhibitors? Thank you in advance