https://www.linkedin.com/learning/topics/business
我想从网页中提取动态内容 使用硒。 输出:快速Windows技巧,SAP业务一精要培训
driver = webdriver.Chrome(executable_path='/home/bhanu/tutorial/tutorial/chromedriver)
url = "https://www.linkedin.com/learning/topics/business"
driver.get(url)
html = driver.page_source
soup = BeautifulSoup(html, "lxml")
t=soup.body
f= t.find_all('div',{'class':'ember-view'})
h=[]
for x in f:
g=x.find_all('div',{'class':'init-body init-body--with-nav-bar
init-body--with-secondary-nav ember-view'})
h.append(g)
for t in h:
for u in t:
j=u.find_all('main',{'class':'init-body__main'})
for k in j:
a=k.find_all('div',{'class':'self-focused ember-view'})
for x in a:
s=x.find_all('div',{'class':'topics-
body__search-results content-block'})