BeautifulSoup

#start


from bs4 import BeautifulSoup
import requests

req = requests.get('https://www.slickcharts.com/sp500')
soup = BeautifulSoup(req.text, 'html.parser')

Here is what the above code is Doing:
1. We’re using the requests library to get the HTML from the website.
2. We’re using the BeautifulSoup library to parse the HTML we got from the website.
3. We’re storing the parsed HTML in the variable soup.