Skip to content

Commit b4f567d

Browse files
Update project_20_web_scraper.py
1 parent 0072424 commit b4f567d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

project_20_web_scraper.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@
88

99
r = requests.get(url)
1010

11-
print(r)
11+
# print(r)
1212

13-
# Continuing...
13+
soup = BeautifulSoup(r.content, 'lxml')
14+
15+
title = soup.find_all('p', {'class':'portfolio-thumb-title'})
16+
17+
# print(title)
18+
19+
# print(title[0].getText())
20+
txt = title[0].getText()
21+
# print(txt)
22+
23+
for t in title:
24+
print(t.getText())
25+
26+
z = input("Enter any key to quit...")
27+
quit()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy