mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
fix: enhance error logging with exception info across multiple modules
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import requests
|
||||
from urllib.parse import urlparse, urljoin
|
||||
from bs4 import BeautifulSoup
|
||||
@@ -42,7 +43,7 @@ class CrawlerLoader(BaseRemote):
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
print(f"Error processing URL {current_url}: {e}")
|
||||
logging.error(f"Error processing URL {current_url}: {e}", exc_info=True)
|
||||
continue
|
||||
|
||||
# Parse the HTML content to extract all links
|
||||
@@ -61,4 +62,4 @@ class CrawlerLoader(BaseRemote):
|
||||
if self.limit is not None and len(visited_urls) >= self.limit:
|
||||
break
|
||||
|
||||
return loaded_content
|
||||
return loaded_content
|
||||
|
||||
Reference in New Issue
Block a user