Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2ee0b43

Browse files
web scraping
1 parent 0fc036b commit 2ee0b43

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#printing the text..
2+
import requests
3+
import bs4
4+
link =input("Enter the url: ")
5+
page =requests.get(link)
6+
print(page.text)
7+
8+
#print the text in a readable form..
9+
soup =bs4.BeautifulSoup(page.text,'html.parser')
10+
text_format =soup.prettify()
11+
print(text_format)
12+
13+
#print the list of image tag....
14+
image_list =soup.find_all('img')
15+
print(image_list)
16+
17+
#print the no of image tag.....
18+
count_the_image =len(image_list)
19+
print(count_the_image)
20+
21+
22+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /