Fix aggregator being blank on Sundays and BS4 warnings

This commit is contained in:
2023-03-26 13:52:17 -04:00
parent f082bea571
commit c571043788
8 changed files with 58 additions and 70 deletions

View File

@ -82,7 +82,7 @@ def scrape_data_from_google_podcasts(title) -> dict:
url = PODCAST_SEARCH_URL.format(query=title)
r = requests.get(url, headers=headers)
if r.status_code == 200:
soup = BeautifulSoup(r.text, "html")
soup = BeautifulSoup(r.text, "html.parser")
data_dict["title"] = _get_title_from_soup(soup)
data_dict["description"] = _get_description_from_soup(soup)
data_dict["producer"] = _get_producer_from_soup(soup)