This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
# reusable main soup function | |
def lovely_soup(url): # passes the url as a variable | |
r = requests.get(url) # get the requested url | |
soup = BeautifulSoup(r.text, 'lxml') # turn html content into soup | |
return soup | |
# soup helper function |