Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Update cleanup_html.py
VinciGit00dc9171936595
diff --git a/scrapegraphai/utils/cleanup_html.py b/scrapegraphai/utils/cleanup_html.pyindex bc16a99b..00f742a7 100644--- a/scrapegraphai/utils/cleanup_html.py+++ b/scrapegraphai/utils/cleanup_html.py@@ -5,6 +5,7 @@ from bs4 import BeautifulSoupfrom minify_html import minifyfrom urllib.parse import urljoin+def cleanup_html(html_content: str, base_url: str) -> str:"""Processes HTML content by removing unnecessary tags, minifying the HTML, and extracting the title and body content.@@ -45,9 +46,6 @@ def cleanup_html(html_content: str, base_url: str) -> str:if body_content:# Minify the HTML within the body tagminimized_body = minify(str(body_content))- print("Came here")return "Title: " + title + ", Body: " + minimized_body + ", Links: " + str(link_urls)-- print("No Came here")- return "Title: " + title + ", Body: No body content found" + ", Links: " + str(link_urls)\ No newline at end of file+ return "Title: " + title + ", Body: No body content found" + ", Links: " + str(link_urls)