【发布时间】:2020-07-01 08:04:33
【问题描述】:
我想抓取此页面 [此页面][1] 上的所有课程名称,这是我的代码
URL = 'https://www.bachelorsportal.com/search/bachelors-degrees/computer-science-it/#q=di-24|lv-bachelor?'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
results = soup.findAll(class_='StudyTitle')
print(results)
我得到一个空数组
【问题讨论】:
-
搜索结果内容可能是用JS动态渲染的,所以没有给定id的标签
-
如何取消课程?
标签: python web-scraping beautifulsoup request