Visit All URLs with selenium python
python at deborahswanson.net
Thu Apr 13 01:29:00 EDT 2017
Nicole wrote, on Wednesday, April 12, 2017 9:49 PM
> p_links =
> browser.find_elements_by_css_selector('div > h3 > a')
> url_list = 
> for urls in p_links:
> if "Rashmi Custom Tailors" in urls.text:
> url = urls.get_attribute("href")
> for url in url_list:
> it just visit first url not all .. Can anybody help how to fix that..
You don't say what module you're using and it would help to see the
"import ..." statement.
But there are a couple things I can think of that could be causing the
There's only one result with the exact phrase "Rashmi Custom
The css_selector('div > h3 > a') only occurs for the first
selectors for subsequent results are different. I've seen that
the div extends all the way down the list until after the last
the results after the first one might have css_selector('h3 >
I'm just guessing about how they might be different.
More information about the Python-list