1from requests import get
2from bs4 import BeautifulSoup as bs
3
4page = get("http://website.url/goes-here")
5soup = bs(page.content, 'html.parser')
1#start
2
3
4from bs4 import BeautifulSoup
5import requests
6
7req = requests.get('https://www.slickcharts.com/sp500')
8soup = BeautifulSoup(req.text, 'html.parser')
1from bs4 import BeautifulSoup
2
3with open("index.html") as fp:
4 soup = BeautifulSoup(fp)
5
6soup = BeautifulSoup("<html>a web page</html>")
7