Skip to content

Python scraper based on AI

fix of the bug for fetching the code

Marco Vinciguerraf5e7a8bfaf2c
diff --git a/examples/extras/scrape_do.py b/examples/extras/scrape_do.py
index 7f173a99..45026f21 100644
--- a/examples/extras/scrape_do.py
+++ b/examples/extras/scrape_do.py
@@ -31,8 +31,8 @@ graph_config = {
# ************************************************
smart_scraper_graph = SmartScraperGraph(
- prompt="List me what does the company do, the name and a contact email.",
- source="https://scrapegraphai.com/",
+ prompt="List me all the projects",
+ source="https://perinim.github.io/projects/",
config=graph_config
)
diff --git a/scrapegraphai/nodes/fetch_node.py b/scrapegraphai/nodes/fetch_node.py
index d727d873..96823347 100644
--- a/scrapegraphai/nodes/fetch_node.py
+++ b/scrapegraphai/nodes/fetch_node.py
@@ -288,8 +288,8 @@ class FetchNode(BaseNode):
data = scrape_do_fetch(self.scrape_do.get("api_key"),
source)
- document = [Document(page_content=content,
- metadata={"source": source}) for content in data]
+ document = [Document(page_content=data,
+ metadata={"source": source})]
else:
loader = ChromiumLoader([source], headless=self.headless, **loader_kwargs)
document = loader.load()