Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Merge branch 'pre/beta' into supercoder-327
Marco Vinciguerra5065aa00e1a4
diff --cc scrapegraphai/utils/cleanup_html.pyindex ea008fc5,1774af20..d3b4dd48--- a/scrapegraphai/utils/cleanup_html.py+++ b/scrapegraphai/utils/cleanup_html.py@@@ -63,9 -53,9 +59,9 @@@ def cleanup_html(html_content: str, basif body_content:# Minify the HTML within the body tagminimized_body = minify(str(body_content))-return title, minimized_body, link_urls, image_urls- # return "Title: " + title + ", Body: " + minimized_body + ", Links: " + str(link_urls) + ", Images: " + str(image_urls)- # Add fallback mechanism- # throw an error if no body content is found- raise ValueError("No HTML body content found, please try setting the 'headless' flag to False in the graph configuration.")+ else:+ logging.error(f'No body content found in HTML: {html_content}')+ raise ValueError(f"No HTML body content found, please try setting the 'headless' flag to False in the graph configuration. HTML content: {html_content}")++