mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
fix(docloaders): BrowserBase dynamic import
This commit is contained in:
parent
22ab45f6bd
commit
5c16ee985b
@ -2,7 +2,6 @@
|
||||
browserbase integration module
|
||||
"""
|
||||
from typing import List
|
||||
from browserbase import Browserbase
|
||||
|
||||
def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[str]:
|
||||
"""
|
||||
@ -41,6 +40,12 @@ def browser_base_fetch(api_key: str, project_id: str, link: List[str]) -> List[s
|
||||
object: The result of the loading operation.
|
||||
"""
|
||||
|
||||
try:
|
||||
from browserbase import Browserbase
|
||||
except ImportError:
|
||||
raise ImportError("The browserbase module is not installed. Please install it using `pip install browserbase`.")
|
||||
|
||||
|
||||
browserbase = Browserbase(api_key=api_key, project_id=project_id)
|
||||
|
||||
result = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user