亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我想使用 beautifulsoup 從 python 中的鏈接獲取內容

我想使用 beautifulsoup 從 python 中的鏈接獲取內容

牛魔王的故事 2023-02-22 15:39:40
我正在嘗試從https://www.indeed.ae/jobs?q=&l=dubai中刪除數據我想獲取內容(點擊上面鏈接上的每個職位即可獲得)我正在使用 python、requests 和 bs4它的內容來自鏈接中的鏈接,我想獲取每份工作的所有內容import requestsfrom bs4 import BeautifulSoupimport lxmlimport urllib.requesturl = 'https://www.indeed.ae/jobs?q=&l=dubai'response = requests.get(url)soup = BeautifulSoup(response.text, 'lxml')links = soup.find_all('a', {'class': 'jobtitle turnstileLink'})for correct_url in (soup.find_all('a', {'class': 'jobtitle turnstileLink'})):    correct_url = ("https://indeed.ae" + (links.get('href')))    print(correct_url)
查看完整描述

1 回答

?
夢里花落0921

TA貢獻1772條經驗 獲得超6個贊

此腳本將打印所有作業的描述(頁面通過 JavaScipt 加載此信息,但您可以使用requests模塊來加載此信息):


import requests

from bs4 import BeautifulSoup



url = 'https://www.indeed.ae/jobs?q=&l=dubai'

jobdesc_url = 'https://www.indeed.ae/rpc/jobdescs'

soup = BeautifulSoup(requests.get(url).content, 'html.parser')

jks = ','.join(jk['data-jk'] for jk in soup.select('[data-jk]'))


descriptions = requests.get(jobdesc_url, params={'jks': jks}).json()


for jk in soup.select('[data-jk]'):

    print(jk.h2.get_text(strip=True))

    print()

    print(jk.find_next('span', class_='company').get_text(strip=True))

    print('---')

    print(BeautifulSoup(descriptions[jk['data-jk']], 'html.parser').get_text())

    print('-' * 80)

印刷:


RETAIL SALES ASSOCIATE


Al Ghazi

---

Hiring a Retail Sales Associate for Dubai.


Key Responsibilities:

Attend to walk in customers, phone calls and provide customer service.

Maintain a conducive environment in the outlet through house keeping.

Promote products and ensure high levels of customer satisfaction through customer journey mapping.

Recommend and display items that match customers’ needs and preferences.


Key Requirements:

High school Diploma.

One to two years experience as a Retail sales Associate.

Presentable and well-groomed

Observe strict punctuality.

Able to work well in a team.

Able to multi-task.

--------------------------------------------------------------------------------

Human Resource Officer


Raban Al-Safina

---

The Role

We are looking for a HR Officer with 3 to 4 years UAE work experience.Candidate must be available currently in UAE and ready to join immediately. Candidates on Husband / Father Sponsor visas will be given more preference. Job Responsibilities: ? Working closely with various departments, increasingly in a consultancy role, assisting line managers to understand and implement policies and procedures ? Administering payroll and maintaining employee records ? Interpreting and advising on employment law ? Advising on pay and other remuneration issues, including promotion and benefits ? Developing and implementing policies on issues like working conditions, performance management, equal opportunities, ? Disciplinary procedures and absence management ? Recruiting staff, which involves developing job descriptions and person specifications, preparing job adverts, checking application forms, shortlisting, interviewing and selecting candidates


Requirements


As a Human Resources (HR) officer you'll develop, advise on and implement policies relating to the effective use of staff in an organisation. ? In the role your aim is to ensure that the organisation you work for employs the right balance of staff in terms of skill and experience, and that training and development opportunities are available to colleagues to enhance their performance and achieve the company's business aims. ? HR officers are involved in a range of activities whatever the size or type of business. These cover areas such as: ? Conditions of employment ? Equality and diversity ? Negotiation with external work-related agencies ? Pay roll management ? Recruitment ? Working practices.


About the company

Raban Al-Safina Group of Companies stands as one of the most prominent industrial organizations in Iraq work in different fields in power industry, oil & gas, systems technology, and many others.

--------------------------------------------------------------------------------


...and so on.


查看完整回答
反對 回復 2023-02-22
  • 1 回答
  • 0 關注
  • 147 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號