Testes Algoritmo 1 e Algoritmo 2.
Teste trackFolhaSP
import sys
# Algoritmo 1 ( trackFolhaSP ).
f1 = trackFolhaSP()
sys.getsizeof(f1)
#104
# --------
#Algoritmo 2 ( trackFolhaSPv2 ).
f2 = trackFolhaSP()
sys.getsizeof( fsp_news_list )
#248
for i in f2:
print(i)
Output:
{'Editorial': 'Em Cima Da Hora', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875daa960>}
{'Editorial': 'Opinião', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875daa030>}
{'Editorial': 'Política', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875daaa40>}
{'Editorial': 'Mundo', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875dab990>}
{'Editorial': 'Mercado', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875da93f0>}
{'Editorial': 'Cotidiano', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875da9ee0>}
{'Editorial': 'Educação', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de5150>}
{'Editorial': 'Equilíbrio', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de7760>}
{'Editorial': 'Esporte', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875da93f0>}
{'Editorial': 'Ilustrada', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875da9930>}
{'Editorial': 'Ilustríssima', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de6030>}
{'Editorial': 'Ciência', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875dc5fc0>}
{'Editorial': 'Ambiente', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de7ca0>}
{'Editorial': 'Tec', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875dc4580>}
{'Editorial': 'Comida', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de60a0>}
{'Editorial': 'Saúde', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875dc6730>}
{'Editorial': 'Folhinha', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875dc7df0>}
{'Editorial': 'Turismo', 'Noticias': <generator object trackFolhaSP.<locals>.<genexpr>.<genexpr> at 0x7f6875de5a80>}
for j in fsp_news_list:
print(j)
Output:
{'Editorial': 'Em Cima Da Hora', 'Noticias': [{'Title': 'Lula chama encontro com Maduro de momento histórico que revive política externa', 'Summary': 'O presidente Luiz Inácio <a href="https://www1.folha.uol.com.br/folha-topicos/lula/" rel="" target="">Lula</a> da Silva (PT) afirmou nesta segunda (29) que a visita do ditador da Venezuela, Nicolás Maduro, é um momento histórico e que "reflete uma política externa séria".\n<a href="https://redir.folha.com.br/redir/online/emcimadahora/rss091/*https://www1.folha.uol.com.br/mundo/2023/05/lula-chama-encontro-com-maduro-de-momento-historico-que-revive-politica-externa.shtml">Leia mais</a> (05/29/2023 - 13h30)', 'href': 'https://www1.folha.uol.com.br/mundo/2023/05/lula-chama-encontro-com-maduro-de-momento-historico-que-revive-politica-externa.shtml'}, {'Title': 'Priyanka Chopra, primeira atriz indiana a engatar carreira no Ocidente', 'Summary': 'Bollywood, o nome informal da indústria cinematográfica da Índia, é quase um mundo à parte. Só uma fração de sua produção colossal, de cerca de 2.000 filmes por ano, chega às telas do Ocidente. Astros como Sharukh Khan são famosos em todo o sul da Ásia, mas praticamente desconhecidos no resto do mundo.\n<a href="https://redir.folha.com.br/redir/online/emcimadahora/rss091/*https://f5.folha.uol.com.br/colunistas/tonygoes/2023/05/priyanka-chopra-primeira-atriz-indiana-a-engatar-carreira-no-ocidente.shtml">Leia mais</a> (05/29/2023 - 13h27)', 'href': 'https://f5.folha.uol.com.br/colunistas/tonygoes/2023/05/priyanka-chopra-primeira-atriz-indiana-a-engatar-carreira-no-ocidente.shtml'}, {'Title': 'Polícia prende 33 suspeitos de aplicar golpe do nude em RS e SC', 'Summary': 'Uma operação na manhã desta segunda-feira (29) em 11 cidades do <a href="https://www1.folha.uol.com.br/folha-topicos/rio-grande-do-sul-estado/" rel="" target="">Rio Grande do Sul </a>e <a href="https://www1.folha.uol.com.br/folha-topicos/santa-catarina-estado/" rel="" target="">Santa Catarina</a> prendeu uma quadrilha que aplicava o golpe dos nudes. Conforme a Polícia Civil gaúcha, foram detidos 33 suspeitos e identificadas 80 vítimas em 12 estados do Brasil.\n<a href="https://redir.folha.com.br/redir/online/emcimadahora/rss091/*https://www1.folha.uol.com.br/cotidiano/2023/05/policia-prende-33-suspeitos-de-aplicar-golpe-do-nude-em-rs-e-sc.shtml">Leia mais</a> (05/29/2023 - 13h19)', 'href': 'https://www1.folha.uol.com.br/cotidiano/2023/05/policia-prende-33-suspeitos-de-aplicar-golpe-do-nude-em-rs-e-sc.shtml'}, {'Title': 'Empresa oferece R$ 9,2 milhões por mês para operar Smart Sampa', 'Summary': 'O pregão do <a href="https://www1.folha.uol.com.br/cotidiano/2023/04/tribunal-libera-edital-que-preve-implantacao-de-reconhecimento-facial-em-sao-paulo.shtml" rel="" target="">Smart Sampa</a>, programa da Prefeitura de <a href="https://www1.folha.uol.com.br/folha-topicos/sao-paulo/" rel="" target="">São Paulo</a> que pretende instalar 20 mil câmeras de segurança com tecnologia de reconhecimento facial na cidade, selecionou um lance de R$ 9,2 milhões por mês para operar o sistema. Se a oferta for confirmada, o vencedor da licitação deve faturar um total de R$ 552 milhões ao longo de 60 meses.\n<a href="https://redir.folha.com.br/redir/online/emcimadahora/rss091/*https://www1.folha.uol.com.br/cotidiano/2023/05/empresa-oferece-r-92-milhoes-por-mes-para-operar-smart-sampa.shtml">Leia mais</a> (05/29/2023 - 13h15)', 'href': 'https://www1.folha.uol.com.br/cotidiano/2023/05/empresa-oferece-r-92-milhoes-por-mes-para-operar-smart-sampa.shtml'}, {'Title': 'Fernanda Montenegro dará árvore para Zé Celso, que plantará presente em terreno de Silvio Santos', 'Summary': 'A atriz<a href="https://www1.folha.uol.com.br/folha-topicos/fernanda-montenegro/" rel="" target=""> Fernanda Montenegro</a> e sua filha<a href="https://www1.folha.uol.com.br/colunas/fernandatorres/" rel="" target="">, Fernanda Torres,</a> não poderão comparecer ao<a href="https://www1.folha.uol.com.br/colunas/monicabergamo/2023/04/ze-celso-convidara-silvio-santos-para-casamento-e-pedira-terreno-do-teatro-oficina-de-presente.shtml" rel="" target=""> casamento </a>de <a href="https://www1.folha.uol.com.br/colunas/monicabergamo/2021/10/filme-sobre-reencontro-de-reynaldo-gianecchini-com-ze-celso-estreia-na-mostra-de-sp.shtml">José Celso Martinez </a><a href="https://www1.folha.uol.com.br/colunas/monicabergamo/2021/10/filme-sobre-reencontro-de-reynaldo-gianecchini-com-ze-celso-estreia-na-mostra-de-sp.shtml">Corrêa</a>, 86, e Marcelo Drummond, 60, no próximo dia 6, em São Paulo, mas preparam um presente especial: vão dar um ipê ao casal. E não trata-se de uma muda não, mas, sim, de uma árvore já grande.\n<a href="https://redir.folha.com.br/redir/online/emcimadahora/rss091/*https://www1.folha.uol.com.br/colunas/monicabergamo/2023/05/fernanda-montenegro-dara-arvore-para-ze-celso-que-plantara-presente-em-terreno-de-silvio-santos.shtml">Leia mais</a> (05/29/2023 - 13h07)', 'href': 'https://www1.folha.uol.com.br/colunas/monicabergamo/2023/05/fernanda-montenegro-dara-arvore-para-ze-celso-que-plantara-presente-em-terreno-de-silvio-santos.shtml'}, ... ]