mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-28 21:01:55 +08:00
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
This commit is contained in:
parent
a5401394cc
commit
57fd01f9a7
@ -3,7 +3,7 @@ browserbase integration module
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[str]:
|
||||
def browser_base_fetch(api_key: str, project_id: str, link: List[str], text_content: bool = True) -> List[str]:
|
||||
"""
|
||||
BrowserBase Fetch
|
||||
|
||||
@ -50,6 +50,6 @@ def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[s
|
||||
|
||||
result = []
|
||||
for l in link:
|
||||
result.append(browserbase.load(l, text_content=True))
|
||||
result.append(browserbase.load(l, text_content=text_content))
|
||||
|
||||
return result
|
||||
|
||||
Loading…
Reference in New Issue
Block a user