Scraping template
from bs4 import BeautifulSoup, NavigableString, Tag from urllib.request import Request, urlopen url = "[URL]" req = Request(url, headers={'User-Agent': 'Mozilla/5.0'}) webpage = urlopen(req).read() soup = BeautifulSoup(webpage, 'html.parser')
Get text value
Find div where class is div_class
val = soup.find('div', attrs={'class': 'div_class'})
Get associated text
val.getText()