Skip to content

Pre/beta #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
2b5bd80
fix: Schema parameter type
Telsho Jan 15, 2025
fe9570b
Merge pull request #895 from Telsho/main
PeriniM Jan 21, 2025
006a2aa
ci(release): 1.36.1-beta.1 [skip ci]
semantic-release-bot Jan 21, 2025
470f9e2
Merge branch 'main' into pre/beta
VinciGit00 Jan 22, 2025
d5c7c9c
ci(release): 1.37.1-beta.1 [skip ci]
semantic-release-bot Jan 22, 2025
b300ca8
test: Add coverage improvement test for tests/test_search_graph.py
codebeaver-ai[bot] Jan 27, 2025
98be43e
test: Add coverage improvement test for tests/test_json_scraper_graph.py
codebeaver-ai[bot] Jan 27, 2025
1996b9d
codebeaver-ai[bot] Jan 27, 2025
02629e2
Merge pull request #908 from ScrapeGraphAI/codebeaver/pre/beta
VinciGit00 Jan 28, 2025
a406264
test: Update coverage improvement test for tests/graphs/abstract_grap…
codebeaver-ai[bot] Jan 28, 2025
9919e7c
test: Update coverage improvement test for tests/test_json_scraper_gr…
codebeaver-ai[bot] Jan 28, 2025
16c688f
test: Update coverage improvement test for tests/test_search_graph.py
codebeaver-ai[bot] Jan 28, 2025
cdb2f61
Merge pull request #910 from ScrapeGraphAI/codebeaver/pre/beta-904
VinciGit00 Jan 29, 2025
d022e5c
test: Update coverage improvement test for tests/graphs/abstract_grap…
codebeaver-ai[bot] Jan 29, 2025
f5ebe8a
test: Update coverage improvement test for tests/test_json_scraper_gr…
codebeaver-ai[bot] Jan 29, 2025
ba58568
test: Update coverage improvement test for tests/test_search_graph.py
codebeaver-ai[bot] Jan 29, 2025
c002bf4
Merge pull request #911 from ScrapeGraphAI/codebeaver/pre/beta-904
VinciGit00 Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
## [1.37.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.36.0...v1.37.0) (2025-01-21)
## [1.37.1-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.37.0...v1.37.1-beta.1) (2025-01-22)


### Features
### Bug Fixes

* Schema parameter type ([2b5bd80](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/2b5bd80a945a24072e578133eacc751feeec6188))


### CI

* **release:** 1.36.1-beta.1 [skip ci] ([006a2aa](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/006a2aaa3fbafbd5b2030c48d5b04b605532c06f))

## [1.36.1-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.36.0...v1.36.1-beta.1) (2025-01-21)

* add integration for search on web ([224ff07](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/224ff07032d006d75160a7094366fac17023aca1))


### Bug Fixes

* Schema parameter type ([2b5bd80](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/2b5bd80a945a24072e578133eacc751feeec6188))
* search ([ce25b6a](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ce25b6a4b0e1ea15edf14a5867f6336bb27590cb))



### Docs


* add requirements.dev ([6e12981](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/6e12981e637d078a6d3b3ce83f0d4901e9dd9996))
* added first ollama example ([aa6a76e](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/aa6a76e5bdf63544f62786b0d17effa205aab3d8))

Expand Down
2 changes: 2 additions & 0 deletions codebeaver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from: pytest
setup_commands: ['@merge', 'pip install -q selenium', 'pip install -q playwright', 'playwright install']
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "scrapegraphai"
version = "1.37.0"

version = "1.37.1b1"


description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/graphs/abstract_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import uuid
import warnings
from abc import ABC, abstractmethod
from typing import Optional
from typing import Optional, Type

from langchain.chat_models import init_chat_model
from langchain_core.rate_limiters import InMemoryRateLimiter
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(
prompt: str,
config: dict,
source: Optional[str] = None,
schema: Optional[BaseModel] = None,
schema: Optional[Type[BaseModel]] = None,
):
if config.get("llm").get("temperature") is None:
config["llm"]["temperature"] = 0
Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/code_generator_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SmartScraperGraph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -56,7 +56,11 @@ class CodeGeneratorGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
super().__init__(prompt, config, source, schema)

Expand Down
10 changes: 7 additions & 3 deletions scrapegraphai/graphs/csv_scraper_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module for creating the smart scraper
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand All @@ -22,7 +22,7 @@ class CSVScraperGraph(AbstractGraph):
config (dict): Additional configuration parameters needed by some nodes in the graph.

Methods:
__init__ (prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None):
__init__ (prompt: str, source: str, config: dict, schema: Optional[Type[BaseModel]] = None):
Initializes the CSVScraperGraph with a prompt, source, and configuration.

__init__ initializes the CSVScraperGraph class. It requires the user's prompt as input,
Expand All @@ -49,7 +49,11 @@ class CSVScraperGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
"""
Initializes the CSVScraperGraph with a prompt, source, and configuration.
Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/graphs/csv_scraper_multi_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import List, Optional
from typing import List, Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(
prompt: str,
source: List[str],
config: dict,
schema: Optional[BaseModel] = None,
schema: Optional[Type[BaseModel]] = None,
):

self.copy_config = safe_deepcopy(config)
Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/depth_search_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
depth search graph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -54,7 +54,11 @@ class DepthSearchGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
super().__init__(prompt, config, source, schema)

Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/document_scraper_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This module implements the Document Scraper Graph for the ScrapeGraphAI application.
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -44,7 +44,11 @@ class DocumentScraperGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
super().__init__(prompt, config, source, schema)

Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/graphs/document_scraper_multi_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import List, Optional
from typing import List, Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(
prompt: str,
source: List[str],
config: dict,
schema: Optional[BaseModel] = None,
schema: Optional[Type[BaseModel]] = None,
):
self.copy_config = safe_deepcopy(config)
self.copy_schema = deepcopy(schema)
Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/json_scraper_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
JSONScraperGraph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -42,7 +42,11 @@ class JSONScraperGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
super().__init__(prompt, config, source, schema)

Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/graphs/json_scraper_multi_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import List, Optional
from typing import List, Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(
prompt: str,
source: List[str],
config: dict,
schema: Optional[BaseModel] = None,
schema: Optional[Type[BaseModel]] = None,
):

self.copy_config = safe_deepcopy(config)
Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/omni_scraper_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This module implements the Omni Scraper Graph for the ScrapeGraphAI application.
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -47,7 +47,11 @@ class OmniScraperGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
self.max_images = 5 if config is None else config.get("max_images", 5)

Expand Down
6 changes: 4 additions & 2 deletions scrapegraphai/graphs/omni_search_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -41,7 +41,9 @@ class OmniSearchGraph(AbstractGraph):
>>> result = search_graph.run()
"""

def __init__(self, prompt: str, config: dict, schema: Optional[BaseModel] = None):
def __init__(
self, prompt: str, config: dict, schema: Optional[Type[BaseModel]] = None
):

self.max_results = config.get("max_results", 3)

Expand Down
10 changes: 7 additions & 3 deletions scrapegraphai/graphs/screenshot_scraper_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ScreenshotScraperGraph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand All @@ -21,7 +21,7 @@ class ScreenshotScraperGraph(AbstractGraph):
source (str): The source URL or image link to scrape from.

Methods:
__init__(prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None)
__init__(prompt: str, source: str, config: dict, schema: Optional[Type[BaseModel]] = None)
Initializes the ScreenshotScraperGraph instance with the given prompt,
source, and configuration parameters.

Expand All @@ -33,7 +33,11 @@ class ScreenshotScraperGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
super().__init__(prompt, config, source, schema)

Expand Down
8 changes: 6 additions & 2 deletions scrapegraphai/graphs/script_creator_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ScriptCreatorGraph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -44,7 +44,11 @@ class ScriptCreatorGraph(AbstractGraph):
"""

def __init__(
self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None
self,
prompt: str,
source: str,
config: dict,
schema: Optional[Type[BaseModel]] = None,
):
self.library = config["library"]

Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/graphs/script_creator_multi_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import List, Optional
from typing import List, Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(
prompt: str,
source: List[str],
config: dict,
schema: Optional[BaseModel] = None,
schema: Optional[Type[BaseModel]] = None,
):

self.copy_config = safe_deepcopy(config)
Expand Down
6 changes: 4 additions & 2 deletions scrapegraphai/graphs/search_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from copy import deepcopy
from typing import List, Optional
from typing import List, Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -42,7 +42,9 @@ class SearchGraph(AbstractGraph):
>>> print(search_graph.get_considered_urls())
"""

def __init__(self, prompt: str, config: dict, schema: Optional[BaseModel] = None):
def __init__(
self, prompt: str, config: dict, schema: Optional[Type[BaseModel]] = None
):
self.max_results = config.get("max_results", 3)

self.copy_config = safe_deepcopy(config)
Expand Down
6 changes: 4 additions & 2 deletions scrapegraphai/graphs/search_link_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SearchLinkGraph Module
"""

from typing import Optional
from typing import Optional, Type

from pydantic import BaseModel

Expand Down Expand Up @@ -36,7 +36,9 @@ class SearchLinkGraph(AbstractGraph):

"""

def __init__(self, source: str, config: dict, schema: Optional[BaseModel] = None):
def __init__(
self, source: str, config: dict, schema: Optional[Type[BaseModel]] = None
):
super().__init__("", config, source, schema)

self.input_key = "url" if source.startswith("http") else "local_dir"
Expand Down
Loading