Skip to content

Commit 69f8e51

Browse files
committed
pulling out the need tags to be pushed to csv
1 parent ff4dbb4 commit 69f8e51

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

WEB SCRAPING/WebScraping-Data-Analytics/pydataanalytics.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import requests
22
from bs4 import BeautifulSoup
3+
4+
#Url to the jobsite (using tottal job as an examples)
35
url = 'https://www.totaljobs.com/jobs/in-london'
46

57
r = requests.get(url)
68

79
#print(r)
810

11+
# parsing the html to beautiful soup
912
html_soup= BeautifulSoup(r.content, 'html.parser')
10-
#print(html_soup.prettify())
13+
14+
# Targeting the jobs container
15+
job_details = html_soup.find('div', class_='ResultsContainer-sc-1rtv0xy-2')
16+
17+
# Pulling out the needed tags
18+
job_titles =job_details.find_all(['h2','li','dl'])
19+
20+
1121

1222

1323

0 commit comments

Comments
 (0)