(python) selenium selector (multi elements)
There is scrapable library "BeautifulSoup"
Selenium is almost same with "BeautifulSoup" but the difference is that Selenium can "DOM" attrubute in dynamic wep page.
I will show you some example.
ex)
1. driver.find_element_by_css_selector("#content")
2. driver.find_element_by_tag_name("div")
If you have to select multi attribute not a single.
you can use "elements" ( append character "s" above element of two example)
the result value type is "LIST"
ex)
1. driver.find_elements_by_css_selector("#content)
2. driver.find_elements_by_css_selector("div")
Selenium is almost same with "BeautifulSoup" but the difference is that Selenium can "DOM" attrubute in dynamic wep page.
I will show you some example.
ex)
1. driver.find_element_by_css_selector("#content")
2. driver.find_element_by_tag_name("div")
If you have to select multi attribute not a single.
you can use "elements" ( append character "s" above element of two example)
the result value type is "LIST"
ex)
1. driver.find_elements_by_css_selector("#content)
2. driver.find_elements_by_css_selector("div")
댓글
댓글 쓰기