Skip to content

Commit 6664da0

Browse files
authored
Merge pull request #720 from ScrapeGraphAI/deep_scraper_integration
Deep scraper integration
2 parents 5cedeb8 + db54d69 commit 6664da0

File tree

76 files changed

+1472
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1472
-194
lines changed

README.md

Lines changed: 3 additions & 18 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
import os
5+
from dotenv import load_dotenv
6+
from scrapegraphai.graphs import DepthSearchGraph
7+
8+
load_dotenv()
9+
10+
graph_config = {
11+
"llm": {
12+
"api_key": os.getenv("ANTHROPIC_API_KEY"),
13+
"model": "openai/gpt-4o-mini",
14+
},
15+
"verbose": True,
16+
"headless": False,
17+
"depth": 2,
18+
"only_inside_links": False,
19+
}
20+
21+
search_graph = DepthSearchGraph(
22+
prompt="List me all the projects with their description",
23+
source="https://perinim.github.io",
24+
config=graph_config
25+
)
26+
27+
result = search_graph.run()
28+
print(result)

examples/azure/code_generator_graph_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Projects(BaseModel):
2828
graph_config = {
2929
"llm": {
3030
"api_key": os.environ["AZURE_OPENAI_KEY"],
31-
"model": "azure_openai/gpt-3.5-turbo",
31+
"model": "azure_openai/gpt-4o"
3232
},
3333
"verbose": True,
3434
"headless": False,

examples/azure/csv_scraper_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
graph_config = {
2626
"llm": {
2727
"api_key": os.environ["AZURE_OPENAI_KEY"],
28-
"model": "azure_openai/gpt-3.5-turbo",
28+
"model": "azure_openai/gpt-4o"
2929
},
3030
"verbose": True,
3131
"headless": False

examples/azure/csv_scraper_graph_multi_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
graph_config = {
2626
"llm": {
2727
"api_key": os.environ["AZURE_OPENAI_KEY"],
28-
"model": "azure_openai/gpt-3.5-turbo",
28+
"model": "azure_openai/gpt-4o"
2929
},
3030
"verbose": True,
3131
"headless": False
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
import os
5+
from dotenv import load_dotenv
6+
from scrapegraphai.graphs import DepthSearchGraph
7+
8+
load_dotenv()
9+
10+
openai_key = os.getenv("OPENAI_APIKEY")
11+
12+
graph_config = {
13+
"llm": {
14+
"api_key": os.environ["AZURE_OPENAI_KEY"],
15+
"model": "azure_openai/gpt-4o",
16+
},
17+
"verbose": True,
18+
"headless": False,
19+
"depth": 2,
20+
"only_inside_links": False,
21+
}
22+
23+
search_graph = DepthSearchGraph(
24+
prompt="List me all the projects with their description",
25+
source="https://perinim.github.io",
26+
config=graph_config
27+
)
28+
29+
result = search_graph.run()
30+
print(result)

examples/azure/json_scraper_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
graph_config = {
2424
"llm": {
2525
"api_key": os.environ["AZURE_OPENAI_KEY"],
26-
"model": "azure_openai/gpt-3.5-turbo",
26+
"model": "azure_openai/gpt-4o"
2727
},
2828
"verbose": True,
2929
"headless": False

examples/azure/json_scraper_multi_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
graph_config = {
1313
"llm": {
1414
"api_key": os.environ["AZURE_OPENAI_KEY"],
15-
"model": "azure_openai/gpt-3.5-turbo",
15+
"model": "azure_openai/gpt-4o"
1616
},
1717
"verbose": True,
1818
"headless": False

examples/azure/pdf_scraper_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
graph_config = {
1111
"llm": {
1212
"api_key": os.environ["AZURE_OPENAI_KEY"],
13-
"model": "azure_openai/gpt-3.5-turbo",
13+
"model": "azure_openai/gpt-4o"
1414
},
1515
"verbose": True,
1616
"headless": False

examples/azure/rate_limit_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
graph_config = {
2727
"llm": {
2828
"api_key": os.environ["AZURE_OPENAI_KEY"],
29-
"model": "azure_openai/gpt-3.5-turbo",
29+
"model": "azure_openai/gpt-4o",
3030
"rate_limit": {
3131
"requests_per_second": 1
3232
},

examples/azure/scrape_plain_text_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
graph_config = {
2929
"llm": {
3030
"api_key": os.environ["AZURE_OPENAI_KEY"],
31-
"model": "azure_openai/gpt-3.5-turbo",
31+
"model": "azure_openai/gpt-4o"
3232
},
3333
"verbose": True,
3434
"headless": False

examples/azure/script_generator_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
graph_config = {
1616
"llm": {
1717
"api_key": os.environ["AZURE_OPENAI_KEY"],
18-
"model": "azure_openai/gpt-3.5-turbo",
18+
"model": "azure_openai/gpt-4o"
1919
},
2020
"verbose": True,
2121
"headless": False

examples/azure/script_multi_generator_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
graph_config = {
1717
"llm": {
1818
"api_key": os.environ["AZURE_OPENAI_KEY"],
19-
"model": "azure_openai/gpt-3.5-turbo",
19+
"model": "azure_openai/gpt-4o"
2020
},
2121
"verbose": True,
2222
"headless": False

examples/azure/search_graph_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
graph_config = {
2323
"llm": {
2424
"api_key": os.environ["AZURE_OPENAI_KEY"],
25-
"model": "azure_openai/gpt-3.5-turbo",
25+
"model": "azure_openai/gpt-4o"
2626
},
2727
"verbose": True,
2828
"headless": False

examples/azure/search_graph_schema_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Dishes(BaseModel):
3030
graph_config = {
3131
"llm": {
3232
"api_key": os.environ["AZURE_OPENAI_KEY"],
33-
"model": "azure_openai/gpt-3.5-turbo",
33+
"model": "azure_openai/gpt-4o"
3434
},
3535
"verbose": True,
3636
"headless": False

examples/azure/search_link_graph_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
graph_config = {
1616
"llm": {
1717
"api_key": os.environ["AZURE_OPENAI_KEY"],
18-
"model": "azure_openai/gpt-3.5-turbo",
18+
"model": "azure_openai/gpt-4o"
1919
},
2020
"verbose": True,
2121
"headless": False

examples/azure/smart_scraper_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
graph_config = {
2727
"llm": {
2828
"api_key": os.environ["AZURE_OPENAI_KEY"],
29-
"model": "azure_openai/gpt-3.5-turbo",
29+
"model": "azure_openai/gpt-4o"
3030
},
3131
"verbose": True,
3232
"headless": False

examples/azure/smart_scraper_multi_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
graph_config = {
1515
"llm": {
1616
"api_key": os.environ["AZURE_OPENAI_KEY"],
17-
"model": "azure_openai/gpt-3.5-turbo",
17+
"model": "azure_openai/gpt-4o"
1818
},
1919
"verbose": True,
2020
"headless": False

examples/azure/smart_scraper_multi_concat_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
graph_config = {
1616
"llm": {
1717
"api_key": os.environ["AZURE_OPENAI_KEY"],
18-
"model": "azure_openai/gpt-3.5-turbo",
18+
"model": "azure_openai/gpt-4o"
1919
},
2020
"verbose": True,
2121
"headless": False

examples/azure/smart_scraper_schema_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Projects(BaseModel):
2929
graph_config = {
3030
"llm": {
3131
"api_key": os.environ["AZURE_OPENAI_KEY"],
32-
"model": "azure_openai/gpt-3.5-turbo",
32+
"model": "azure_openai/gpt-4o"
3333
},
3434
"verbose": True,
3535
"headless": False

examples/azure/xml_scraper_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
graph_config = {
2525
"llm": {
2626
"api_key": os.environ["AZURE_OPENAI_KEY"],
27-
"model": "azure_openai/gpt-3.5-turbo",
27+
"model": "azure_openai/gpt-4o"
2828
},
2929
"verbose": True,
3030
"headless": False

examples/azure/xml_scraper_graph_multi_azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
graph_config = {
2626
"llm": {
2727
"api_key": os.environ["AZURE_OPENAI_KEY"],
28-
"model": "azure_openai/gpt-3.5-turbo",
28+
"model": "azure_openai/gpt-4o",
2929
},
3030
"verbose": True,
3131
"headless": False
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
import os
5+
from dotenv import load_dotenv
6+
from scrapegraphai.graphs import DepthSearchGraph
7+
8+
load_dotenv()
9+
10+
openai_key = os.getenv("OPENAI_APIKEY")
11+
12+
graph_config = {
13+
"llm": {
14+
"client": "client_name",
15+
"model": "bedrock/anthropic.claude-3-sonnet-20240229-v1:0",
16+
"temperature": 0.0
17+
},
18+
"verbose": True,
19+
"headless": False,
20+
"depth": 2,
21+
"only_inside_links": False,
22+
}
23+
24+
search_graph = DepthSearchGraph(
25+
prompt="List me all the projects with their description",
26+
source="https://perinim.github.io",
27+
config=graph_config
28+
)
29+
30+
result = search_graph.run()
31+
print(result)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
import os
5+
from dotenv import load_dotenv
6+
from scrapegraphai.graphs import DepthSearchGraph
7+
8+
load_dotenv()
9+
10+
deepseek_key = os.getenv("DEEPSEEK_APIKEY")
11+
12+
graph_config = {
13+
"llm": {
14+
"model": "deepseek/deepseek-chat",
15+
"api_key": deepseek_key,
16+
},
17+
"verbose": True,
18+
"headless": False,
19+
"depth": 2,
20+
"only_inside_links": False,
21+
}
22+
23+
search_graph = DepthSearchGraph(
24+
prompt="List me all the projects with their description",
25+
source="https://perinim.github.io",
26+
config=graph_config
27+
)
28+
29+
result = search_graph.run()
30+
print(result)

examples/ernie/custom_graph_ernie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Define the configuration for the graph
1515
# ************************************************
1616

17-
graph_config = {
17+
graph_config = {
1818
"llm": {
1919
"model": "ernie/ernie-bot-turbo",
2020
"ernie_client_id": "<ernie_client_id>",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
from scrapegraphai.graphs import DepthSearchGraph
5+
6+
graph_config = {
7+
"llm": {
8+
"model": "ernie/ernie-bot-turbo",
9+
"ernie_client_id": "<ernie_client_id>",
10+
"ernie_client_secret": "<ernie_client_secret>",
11+
"temperature": 0.1
12+
},
13+
"verbose": True,
14+
"headless": False,
15+
"depth": 2,
16+
"only_inside_links": False,
17+
}
18+
19+
search_graph = DepthSearchGraph(
20+
prompt="List me all the projects with their description",
21+
source="https://perinim.github.io",
22+
config=graph_config
23+
)
24+
25+
result = search_graph.run()
26+
print(result)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
depth_search_graph_opeani example
3+
"""
4+
import os
5+
from dotenv import load_dotenv
6+
from scrapegraphai.graphs import DepthSearchGraph
7+
8+
load_dotenv()
9+
10+
fireworks_api_key = os.getenv("FIREWORKS_APIKEY")
11+
12+
graph_config = {
13+
"llm": {
14+
"api_key": fireworks_api_key,
15+
"model": "fireworks/accounts/fireworks/models/mixtral-8x7b-instruct"
16+
},
17+
"verbose": True,
18+
"headless": False,
19+
"depth": 2,
20+
"only_inside_links": False,
21+
}
22+
23+
search_graph = DepthSearchGraph(
24+
prompt="List me all the projects with their description",
25+
source="https://perinim.github.io",
26+
config=graph_config
27+
)
28+
29+
result = search_graph.run()
30+
print(result)

0 commit comments

Comments
 (0)