``from bs4 import BeautifulSoup import requests`
html_page = requests. Get[jooble]('https://ng.jooble.org/SearchResult?ukw=ict').text
soup = BeautifulSoup(html_page, 'lxml')
job_card = soup.find_all('article', attrs= {"data-test-name":"_jobCard","class_":"FxQpvm yKsady"}, limit=10)
job _title = job _card .find('h2', attrs={"class":"_15V35X"})
job _ Requirment = job _card .find('div', attrs={"class":"_9jGwm1"})
company = job_card.find('p', attrs={"class":"Ya0gV9"})
post_date = job_card.find('div', class_ = 'caption e0VAhp')
job_link = job_card.header.h2.a['href']
print(' ')
print(f'JOB TITLE: {job_title}')
print(f'COMPANY NAME: {company}')
print(f'JOB REQUIREMENT: {job_Requirment} (Read More...)')
print(f'POSTED: {post_date}')
print(f'MORE INFO: {job_link}')
print(' ')
from bs4 import BeautifulSoup import requests
This code is meant to give give me a list of the print line, but
Here is what i get in response: Traceback (most recent call last): File "C:\Users\Samuel Oluwapelumi\Desktop\cs50web\jobs.py", line 8, in job_title = job_card.find('h2', attrs={"class":"_15V35X"}) ^^^^^^^^^^^^^ File "C:\Users\Samuel Oluwapelumi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\bs4\element.py", line 2428, in getattr raise AttributeError( AttributeError: ResultSet object has no attribute 'find'. You're probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?`
@samuel please follow below code, i have made changes to get the job title, please follow same for other categories
output: