"""
This example shows how to do not process the html code in the fetch phase
"""
import os, json
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info
graph_config = {
"llm": {
"api_key": "s",
"model": "openai/gpt-3.5-turbo",
},
"cut": False,
"verbose": True,
"headless": False,
}
smart_scraper_graph = SmartScraperGraph(
prompt="Extract me the python code inside the page",
source="https://www.exploit-db.com/exploits/51447",
config=graph_config
)
result = smart_scraper_graph.run()
print(json.dumps(result, indent=4))
graph_exec_info = smart_scraper_graph.get_execution_info()
print(prettify_exec_info(graph_exec_info))