From 2fc5187c66931206d9eeeeeddd96280941e328da Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 23:30:12 +0000 Subject: [PATCH 1/2] Initial plan From ced037395140c8e164cb62d0d42a8c618f700e0f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 23:35:17 +0000 Subject: [PATCH 2/2] Fix E402 errors in smart_scraper_graph.py by moving imports to top Co-authored-by: VinciGit00 <88108002+VinciGit00@users.noreply.github.com> --- scrapegraphai/graphs/smart_scraper_graph.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrapegraphai/graphs/smart_scraper_graph.py b/scrapegraphai/graphs/smart_scraper_graph.py index 8cf11f35..ffcd3dbe 100644 --- a/scrapegraphai/graphs/smart_scraper_graph.py +++ b/scrapegraphai/graphs/smart_scraper_graph.py @@ -7,9 +7,6 @@ from pydantic import BaseModel -# Initialize logger -logger = logging.getLogger(__name__) - from ..nodes import ( ConditionalNode, FetchNode, @@ -21,6 +18,9 @@ from .abstract_graph import AbstractGraph from .base_graph import BaseGraph +# Initialize logger +logger = logging.getLogger(__name__) + class SmartScraperGraph(AbstractGraph): """ @@ -97,7 +97,7 @@ def _create_graph(self) -> BaseGraph: ) # Use logging instead of print for better production practices - if 'request_id' in response and 'result' in response: + if "request_id" in response and "result" in response: logger.info(f"Request ID: {response['request_id']}") logger.info(f"Result: {response['result']}") else: