【发布时间】:2019-09-23 10:38:28
【问题描述】:
我正在寻找一个网站以获取职位描述信息,但我似乎只得到不相关的文本。这是汤对象的创建:
url = 'https://www.glassdoor.com/Job/boston-full-stack-engineer-jobs-SRCH_IL.0,6_IC1154532_KO7,26.htm?jl=3188635682&guid=0000016a8432102e99e9b5232325d3d5&pos=102&src=GD_JOB_AD&srs=MY_JOBS&s=58&ao=599212'
req = urllib.request.Request(url, headers={'User-Agent' : "Magic Browser"})
soup = bs4.BeautifulSoup(urlopen(req),"html.parser")
divliul=soup.body.findAll(['div','li','ul'])
for i in divliul:
if i.string is not None:
print(i.string)
如果您浏览该网站一秒钟,您会发现汤似乎只包含左侧列中的元素,而职位描述容器中没有任何内容。我认为这可能是一个 urllib 请求问题,但我尝试只下载 html 文件并以这种方式阅读它,结果是相似的。 输出:
Jobs
Company Reviews
Company Reviews
Companies near you
Best Buy Reviews in Boston
Target Reviews in Boston
IBM Reviews in Boston
AT&T Reviews in Boston
The Home Depot Reviews in Boston
Walmart Reviews in Boston
Macy's Reviews in Boston
Microsoft Reviews in Boston
Deloitte Reviews in Boston
Amazon Reviews in Boston
Bank of America Reviews in Boston
Wells Fargo Reviews in Boston
Company Culture
Best Places to Work
12 Companies That Will Pay You to Travel the World
7 Types of Companies You Should Never Work For
20 Companies Hiring for the Best Jobs In America
How to Become the Candidate Recruiters Can’t Resist
13 Companies With Enviable Work From Home Options
New On Glassdoor
Salaries
Interviews
Salary Calculator
Account Settings
Account Settings
Account Settings
Account Settings
empty notification btn
My Profile
Saved Jobs
Email & Alerts
Contributions
My Resumes
Company Follows
Account
Help / Contact Us
Account Settings
Account Settings
Account Settings
empty notification btn
For Employers
For Employers
Unlock Employer Account
Unlock Employer Account
Post a Job
Post a Job
Employer Branding
Job Advertising
Employer Blog
Talk to Sales
Post Jobs Free
Full Stack Engineer Jobs in Boston, MA
Jobs
Companies
Salaries
Interviews
Full Stack Engineer
EASY APPLY
EASY APPLY
Full Stack Engineer | Noodle.com
EASY APPLY
EASY APPLY
Full Stack Engineer
Hot
Software Engineer
EASY APPLY
EASY APPLY
Senior Software Engineer
EASY APPLY
EASY APPLY
We're Hiring
We're Hiring
Full Stack Engineer
Hot
Software Engineer
Hot
Hot
Full Stack Engineer
We're Hiring
Full Stack Software Engineer
EASY APPLY
EASY APPLY
We're Hiring
We're Hiring
Software Engineer
New
New
Full Stack Engineer
EASY APPLY
EASY APPLY
We're Hiring
We're Hiring
Pre-Sales Engineer / Full-Stack Developer
Top Company
Top Company
Full Stack Software Engineer
Software Engineer
Top Company
Top Company
Associate Software Engineer
Full Stack Software Engineer
Software Engineer
New
New
Mid-level Full Stack Software Engineer (Java/React
EASY APPLY
EASY APPLY
Junior Software Engineer - Infrastructure
Software Engineer
Software Engineer
New
New
Associate Software Engineer
C# Engineer - Full Stack
EASY APPLY
EASY APPLY
Software Engineer, Platform
Software Engineer
EASY APPLY
EASY APPLY
Software Engineer
Associate Software Engineer
Software Engineer
Software Engineer
Software Engineer - Features
EASY APPLY
EASY APPLY
Page 1 of 81
Previous
1
2
3
4
5
Next
People Also Searched
Top Cities for Full Stack Engineer:
Top Companies for full stack engineer in Boston, MA:
Help / Contact Us
Terms of Use
Privacy & Cookies (New)
Copyright © 2008–2019, Glassdoor, Inc. "Glassdoor" and logo are proprietary trademarks of Glassdoor, Inc.
Email me jobs for:
Create a Job Alert
Your job alert has been created.
Create more job alerts for related jobs with one click:
【问题讨论】:
-
Beautifulsoup 不加载动态渲染的内容(通过 Javascript),这在越来越多的网站上很常见
-
你想从那个页面抓取什么?
-
嗯,好的。我正在寻找深埋在正文标签中的文本:
<div class="jobDescriptionContent desc"> -
我认为 selenium 可能会这样做
标签: python web-scraping beautifulsoup urllib