python - How can these javascript links be traversed with Selenium or BeautifulSoup? -


i’ve opted selenium since links’ hrefs generated dynamically, although method via bs4 preferred.

i'm using phantomjs have tried firefox well

when attempting click link, nothing happens.

for instance,

url = 'http://www.achema.de/de/ausstellung/aussteller-und-produkte.html'  driver.get(url)  resultsbox = driver.find_element_by_css_selector('div[id="ix_result"]')  tr in resultsbox.find_elements_by_tag_name('tr'):     link = tr.find_element_by_tag_name('a')     link.click()      # i've tried:     # actionchains(driver).move_to_element(link).click(link).perform() 

as orenthal indicated, found link being clicked. however, page loaded dynamic, sleep of @ least 2 seconds needed occur before attempting extract link.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -