Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c1cead0
Merge pull request #982 from ScrapeGraphAI/pre/beta
VinciGit00 Jun 6, 2025
3322f9d
Update README.md
VinciGit00 Jun 6, 2025
30e6b59
ci(release): 1.54.0 [skip ci]
semantic-release-bot Jun 6, 2025
e846a14
fix: bug on generate answer node
VinciGit00 Jun 6, 2025
38b3997
ci(release): 1.54.1 [skip ci]
semantic-release-bot Jun 6, 2025
cd29791
feat: add adv
VinciGit00 Jun 7, 2025
8c54162
feat: update logs
VinciGit00 Jun 7, 2025
27d5096
Merge pull request #983 from ScrapeGraphAI/add-adv
VinciGit00 Jun 7, 2025
17d9a72
ci(release): 1.55.0 [skip ci]
semantic-release-bot Jun 7, 2025
2a73821
Update README.md
VinciGit00 Jun 9, 2025
94e9ebd
feat: add scrapegraphai integration
VinciGit00 Jun 13, 2025
3f64f88
ci(release): 1.56.0 [skip ci]
semantic-release-bot Jun 13, 2025
7340375
feat: add markdownify endpoint
VinciGit00 Jun 13, 2025
e4ba4e2
Merge branch 'main' of https://github.com/ScrapeGraphAI/Scrapegraph-ai
VinciGit00 Jun 13, 2025
9a2c02d
ci(release): 1.57.0 [skip ci]
semantic-release-bot Jun 13, 2025
1d1e4db
Update README.md
VinciGit00 Jun 16, 2025
07dec35
docs: add links to other language versions of README
dowithless Jun 16, 2025
273c7d1
Merge pull request #987 from dowithless/patch-1
VinciGit00 Jun 16, 2025
0c2481f
feat: add new oss link
VinciGit00 Jun 21, 2025
aa72708
Merge branch 'main' of https://github.com/ScrapeGraphAI/Scrapegraph-ai
VinciGit00 Jun 21, 2025
45ad464
ci(release): 1.58.0 [skip ci]
semantic-release-bot Jun 21, 2025
288c69a
feat: removed sposnsors
VinciGit00 Jun 24, 2025
3f8bc88
Merge branch 'main' of https://github.com/ScrapeGraphAI/Scrapegraph-ai
VinciGit00 Jun 24, 2025
6989e1a
ci(release): 1.59.0 [skip ci]
semantic-release-bot Jun 24, 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
5 changes: 5 additions & 0 deletions scrapegraphai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
__init__.py file for scrapegraphai folder
"""

from .utils.logging import get_logger, set_verbosity_info

logger = get_logger(__name__)
set_verbosity_info()
12 changes: 11 additions & 1 deletion scrapegraphai/graphs/abstract_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import asyncio
import uuid
import warnings
import time
from abc import ABC, abstractmethod
from typing import Optional, Type

Expand All @@ -14,8 +15,13 @@

from ..helpers import models_tokens
from ..models import CLoD, DeepSeek, OneApi, XAI
from ..utils.logging import set_verbosity_info, set_verbosity_warning
from ..utils.logging import set_verbosity_info, set_verbosity_warning, get_logger
from ..telemetry import log_graph_execution

logger = get_logger(__name__)

# ANSI escape sequence for hyperlink
CLICKABLE_URL = "\033]8;;https://scrapegraphai.com\033\\https://scrapegraphai.com\033]8;;\033\\"

class AbstractGraph(ABC):
"""
Expand Down Expand Up @@ -316,6 +322,10 @@ def run(self) -> str:
"""
Abstract method to execute the graph and return the result.
"""
inputs = {"user_prompt": self.prompt, self.input_key: self.source}
self.final_state, self.execution_info = self.graph.execute(inputs)
result = self.final_state.get("answer", "No answer found.")
return result

async def run_safe_async(self) -> str:
"""
Expand Down
24 changes: 22 additions & 2 deletions scrapegraphai/graphs/base_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

from ..telemetry import log_graph_execution
from ..utils import CustomLLMCallbackManager
from ..utils.logging import get_logger

logger = get_logger(__name__)

# ANSI escape sequence for hyperlink
CLICKABLE_URL = "\033]8;;https://scrapegraphai.com\033\\https://scrapegraphai.com\033]8;;\033\\"

class BaseGraph:
"""
Expand Down Expand Up @@ -353,9 +358,24 @@ def execute(self, initial_state: dict) -> Tuple[dict, list]:

bridge = BurrBridge(self, self.burr_config)
result = bridge.execute(initial_state)
return (result["_state"], [])
state, exec_info = (result["_state"], [])
else:
return self._execute_standard(initial_state)
state, exec_info = self._execute_standard(initial_state)

# Print the result first
if "answer" in state:
print(state["answer"])
elif "parsed_doc" in state:
print(state["parsed_doc"])
elif "generated_code" in state:
print(state["generated_code"])
elif "merged_script" in state:
print(state["merged_script"])

# Then show the message ONLY ONCE
print(f"✨ Try enhanced version of ScrapegraphAI at {CLICKABLE_URL} ✨")

return state, exec_info

def append_node(self, node):
"""
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading