Skip to content

Commit 2e2d062

Browse files
committed
022: Web scraping
1 parent 775ea6f commit 2e2d062

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# web scrapping
2+
3+
# Web scraping is the process of extracting and collecting data from websites and storing it on a local machine or in a database.
4+
5+
6+
import requests
7+
from bs4 import BeautifulSoup
8+
url = 'https://google.com'
9+
10+
# Lets use the requests get method to fetch the data from url
11+
12+
response = requests.get(url)
13+
# lets check the status
14+
status = response.status_code
15+
print(status) # 200 means the fetching was successful
16+

0 commit comments

Comments
 (0)