File size: 526 Bytes
9a3880d
 
 
 
e3ea210
9a3880d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import requests
from bs4 import BeautifulSoup

# Specify the URL
url = "http://btebadmission.gov.bd"

# Send a request to the website
response = requests.get(url)

# Parse the HTML content
soup = BeautifulSoup(response.content, "html.parser")

# Extract the data you need
data = []
for item in soup.find_all("div", class_="example-class"):
    data.append(item.text.strip())

# Save the data to a file or a list for further processing
with open("data.txt", "w") as file:
    for entry in data:
        file.write(entry + "\n")