Skip to content

Commit 800daf1

Browse files
2 parents 608ce73 + a34aaff commit 800daf1

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

backend/src/document_sources/web_pages.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def get_documents_from_web_page(source_url: str):
1515
LLMGraphBuilderException: If loading the web page fails.
1616
"""
1717
try:
18+
if not source_url.startswith(('http://', 'https://')):
19+
source_url = 'https://' + source_url
1820
pages = WebBaseLoader(source_url, verify_ssl=False).load()
1921
return pages
2022
except Exception as exc:

backend/src/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ def create_source_node_graph_web_url(graph, params):
211211
success_count=0
212212
failed_count=0
213213
lst_file_name = []
214+
if not params.source_url.startswith(('http://', 'https://')):
215+
params.source_url = 'https://' + params.source_url
214216
pages = WebBaseLoader(params.source_url, verify_ssl=False).load()
215217
if pages==None or len(pages)==0:
216218
failed_count+=1

0 commit comments

Comments
 (0)