Can someone explain what the beautifulsoup package does

Question:

I have been trying to read a find out what the beautifulsoup package is in python, but I cannot seem to understand it

Answers:

try this

import requests
from bs4 import BeautifulSoup as bs
import io
from PyPDF2 import PdfFileReader


URL = 'https://www.comafi.com.ar/custodiaglobal/eventos-corporativos.aspx'
FILETYPE = '.pdf'
FILENAME = 'Anuncio de dividendo'

def get_soup(url):
    return bs(requests.get(url).text, 'html.parser')
date = '13/09/22'
for link in get_soup(URL).find_all('tr'):
    for i in link.find_all('td'):
        if i.get('class')[0] == 'td-fecha' and i.text == '13/09/22':
            cedar_link = link.find('a').get('href')
            file_link = link.find('a').get('title')
            if FILETYPE in cedar_link:
                if FILENAME in file_link:
                    print(cedar_link)
Answered By: iamtrappedman
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.