【发布时间】:2021-09-28 05:12:36
【问题描述】:
我正在尝试从 here 中抓取职位名称。
我正在学习 python 抓取技术,但我遇到了抓取像这样的 Ajax 页面的问题。我可以使用下面的第一页代码获取开发人员工具响应数据。如何从这些数据中提取职位。
from bs4 import BeautifulSoup
import requests
import json
s = requests.Session()
headers={"User-Agent":"Mozilla/5.0"}
r=s.get('https://epco.taleo.net/careersection/alljobs/jobsearch.ftl?lang=en',headers=headers)
html = r.text
soup = BeautifulSoup(html, 'lxml')
print(soup)
###how to extract job titles from soup###
非常感谢您对此的任何帮助。
不幸的是,我目前仅限于使用请求或其他流行的 python 库。提前致谢。
【问题讨论】:
-
这能回答你的问题吗? Web-scraping JavaScript page with Python
标签: python ajax web-scraping beautifulsoup python-requests