Spaces:
Sleeping
Sleeping
import requests | |
import bs4 | |
import lxml | |
import pandas as pd | |
import os | |
os.environ["INPUT_DATA"] = "Input/Sites.xlsx" ## to silence warning | |
def get_inputData(filePath): | |
df= pd.read_excel(io=filePath) | |
return df | |
def open_url(url): | |
result=requests.get("https://www.bmcadventures.com/collections/one-day-treks") | |
def do_scrape(): | |
soup = bs4.BeautifulSoup(result.text, "lxml") | |
places = soup.select('h3').getText() | |
return places | |
def display_data(): | |
filePath=os.environ.get('INPUT_DATA') | |
df=get_inputData(filePath) | |
st.dataframe(df) | |