Skip to content

Commit 4cd5986

Browse files
authored
Merge branch 'pre/beta' into browserbase_integration
2 parents 5ecdbe7 + 74ed8d0 commit 4cd5986

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.11.0-beta.6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.11.0-beta.5...v1.11.0-beta.6) (2024-07-31)
2+
3+
4+
### Features
5+
6+
* intregration of firebase ([4caed54](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/4caed545e5030460b2d5e46f9ad90546ce36f0ee))
7+
18
## [1.11.0-beta.5](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.11.0-beta.4...v1.11.0-beta.5) (2024-07-30)
29

310

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "scrapegraphai"
33

4-
version = "1.11.0b5"
4+
version = "1.11.0b6"
55

66
description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
77
authors = [
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"""
2+
browserbase integration module
3+
"""
4+
from browserbase import Browserbase
5+
6+
def browser_base_fetch(api_key: str, project_id: str, link: str) -> object:
7+
"""
8+
BrowserBase Fetch
9+
10+
This module provides an interface to the BrowserBase API.
11+
12+
The `browser_base_fetch` function takes three arguments:
13+
- `api_key`: The API key provided by BrowserBase.
14+
- `project_id`: The ID of the project on BrowserBase where you want to fetch data from.
15+
- `link`: The URL or link that you want to fetch data from.
16+
17+
It initializes a Browserbase object with the given API key and project ID,
18+
then uses this object to load the specified link. It returns the result of the loading operation.
19+
20+
Example usage:
21+
22+
```
23+
from browser_base_fetch import browser_base_fetch
24+
25+
result = browser_base_fetch(api_key="your_api_key",
26+
project_id="your_project_id", link="https://example.com")
27+
print(result)
28+
```
29+
30+
Please note that you need to replace "your_api_key" and "your_project_id"
31+
with your actual BrowserBase API key and project ID.
32+
33+
Args:
34+
api_key (str): The API key provided by BrowserBase.
35+
project_id (str): The ID of the project on BrowserBase where you want to fetch data from.
36+
link (str): The URL or link that you want to fetch data from.
37+
38+
Returns:
39+
object: The result of the loading operation.
40+
"""
41+
42+
browserbase = Browserbase(api_key=api_key, project_id=project_id)
43+
44+
result = browserbase.load(link)
45+
46+
return result

0 commit comments

Comments
 (0)