diff --git a/lollms/internet.py b/lollms/internet.py index a416961..9136d65 100644 --- a/lollms/internet.py +++ b/lollms/internet.py @@ -37,28 +37,30 @@ def get_relevant_text_block( title=None, brief=None ): - from bs4 import BeautifulSoup - # Load the webpage - driver.get(url) + try: + from bs4 import BeautifulSoup + # Load the webpage + driver.get(url) - # Wait for JavaScript to execute and get the final page source - html_content = driver.page_source + # Wait for JavaScript to execute and get the final page source + html_content = driver.page_source - # Parse the HTML content - soup = BeautifulSoup(html_content, "html.parser") - # Example: Remove all