define browser bs4 code example
Example 1: how to convert response to beautifulsoup object
import requests
from bs4 import BeautifulSoup
url = 'https://www.google.com'
response = requests.get(url)
html_file = BeautifulSoup(response.text, "html.parser")
print(html_file.prettify())
Example 2: reate the "soup." This is a beautiful soup object:
soup = bs.BeautifulSoup(source,'lxml')