MCPcopy Create free account
hub / github.com/ZiniuLu/Python-100-Days / main

Function main

Day66-75/code/example11.py:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def main():
7 driver = webdriver.Chrome()
8 driver.get('https://v.taobao.com/v/content/live?catetype=704&from=taonvlang')
9 elem = driver.find_element_by_css_selector('input[placeholder=输入关键词搜索]')
10 elem.send_keys('运动')
11 elem.send_keys(Keys.ENTER)
12 soup = BeautifulSoup(driver.page_source, 'lxml')
13 for img_tag in soup.body.select('img[src]'):
14 print(img_tag.attrs['src'])
15
16
17if __name__ == '__main__':

Callers 1

example11.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected