Skip to content

Commit 57fd01f

Browse files
authored
feat(docloaders): Enhance browser_base_fetch function flexibility
- Update browser_base_fetch to accept single URL or list of URLs - Add text_content parameter for choosing between text-only and HTML output - Improve type hinting and function documentation - Ensure compatibility with latest Browserbase SDK interface
1 parent a540139 commit 57fd01f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scrapegraphai/docloaders/browser_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
from typing import List
55

6-
def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[str]:
6+
def browser_base_fetch(api_key: str, project_id: str, link: List[str], text_content: bool = True) -> List[str]:
77
"""
88
BrowserBase Fetch
99
@@ -50,6 +50,6 @@ def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[s
5050

5151
result = []
5252
for l in link:
53-
result.append(browserbase.load(l, text_content=True))
53+
result.append(browserbase.load(l, text_content=text_content))
5454

5555
return result

0 commit comments

Comments
 (0)