File size: 639 Bytes
e7120e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

# Define the URL of the Wikipedia page to scrape
url = 'https://en.wikipedia.org/wiki/Health_care'

# Send an HTTP request to the URL and get the HTML response
response = requests.get(url)

# Parse the HTML content using Beautiful Soup
soup = BeautifulSoup(response.content, 'html.parser')

# Find the list of articles on the page
articles_list = soup.find('div', {'class': 'div-col columns column-width'}).find_all('li')

# Display the list of articles in Streamlit
st.write("List of articles on health care:")
for article in articles_list:
    st.write(article.text)