Scrapegraph-ai/examples/single_node/fetch_node.py
Marco Vinciguerra c19d83f994
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
Python application / build (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Release (push) Has been cancelled
Update fetch_node.py
2024-07-11 18:03:10 +02:00

31 lines
565 B
Python

"""
Example of custom graph using existing nodes
"""
from scrapegraphai.nodes import FetchNode
# ************************************************
# Define the node
# ************************************************
fetch_node = FetchNode(
input="url | local_dir",
output=["doc"],
node_config={
"headless": False
}
)
# ************************************************
# Test the node
# ************************************************
state = {
"url": "https://twitter.com/home"
}
result = fetch_node.execute(state)
print(result)