Skip to content

Commit 97d210c

Browse files
committedOct 8, 2021
find, span
1 parent c25399c commit 97d210c

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed
 

‎day2_3.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
test
1+
import requests
2+
from bs4 import BeautifulSoup
3+
4+
from homework3 import set_url
5+
6+
indeed_result = requests.get("https://www.indeed.com/jobs?q=Python&limit=50")
7+
8+
indeed_soup = BeautifulSoup(indeed_result.text, "html.parser")
9+
10+
pagination = indeed_soup.find("div", {"class":"pagination"})
11+
12+
pages = pagination.find_all('a')
13+
spans = []
14+
for page in pages:
15+
spans.append(page.find("span"))
16+
17+
# print(spans[0:4])
18+
19+
spans = spans[:-1]

0 commit comments

Comments
 (0)