Skip to content

Commit 228a1de

Browse files
committed
add new force
1 parent 92cabe1 commit 228a1de

File tree

5 files changed

+63
-62
lines changed

5 files changed

+63
-62
lines changed

examples/openai/smart_scraper_openai.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33
"""
44

55
import os, json
6-
from dotenv import load_dotenv
76
from scrapegraphai.graphs import SmartScraperGraph
87
from scrapegraphai.utils import prettify_exec_info
98

10-
load_dotenv()
11-
129

1310
# ************************************************
1411
# Define the configuration for the graph
1512
# ************************************************
1613

17-
openai_key = os.getenv("OPENAI_APIKEY")
1814

1915
graph_config = {
2016
"llm": {
21-
"api_key": openai_key,
17+
"api_key": "s",
2218
"model": "gpt-3.5-turbo",
2319
},
2420
"verbose": True,
@@ -30,8 +26,8 @@
3026
# ************************************************
3127

3228
smart_scraper_graph = SmartScraperGraph(
33-
prompt="List me all the titles of the articles",
34-
source="https://www.wired.com",
29+
prompt="Extract me the python code inside the page",
30+
source="https://www.exploit-db.com/exploits/51447",
3531
config=graph_config
3632
)
3733

requirements-dev.lock

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# with-sources: false
99

1010
-e file:.
11-
aiofiles==23.2.1
11+
aiofiles==24.1.0
1212
# via burr
1313
aiohttp==3.9.5
1414
# via langchain
@@ -21,7 +21,7 @@ altair==5.3.0
2121
# via streamlit
2222
annotated-types==0.7.0
2323
# via pydantic
24-
anthropic==0.28.1
24+
anthropic==0.30.0
2525
# via langchain-anthropic
2626
anyio==4.4.0
2727
# via anthropic
@@ -30,6 +30,9 @@ anyio==4.4.0
3030
# via openai
3131
# via starlette
3232
# via watchfiles
33+
async-timeout==4.0.3
34+
# via aiohttp
35+
# via langchain
3336
attrs==23.2.0
3437
# via aiohttp
3538
# via jsonschema
@@ -43,9 +46,9 @@ beautifulsoup4==4.12.3
4346
# via scrapegraphai
4447
blinker==1.8.2
4548
# via streamlit
46-
boto3==1.34.129
49+
boto3==1.34.134
4750
# via langchain-aws
48-
botocore==1.34.129
51+
botocore==1.34.134
4952
# via boto3
5053
# via s3transfer
5154
burr==0.22.1
@@ -88,8 +91,11 @@ dnspython==2.6.1
8891
# via email-validator
8992
docutils==0.19
9093
# via sphinx
91-
email-validator==2.1.2
94+
email-validator==2.2.0
9295
# via fastapi
96+
exceptiongroup==1.2.1
97+
# via anyio
98+
# via pytest
9399
faiss-cpu==1.8.0
94100
# via scrapegraphai
95101
fastapi==0.111.0
@@ -98,7 +104,7 @@ fastapi-cli==0.0.4
98104
# via fastapi
99105
fastapi-pagination==0.12.25
100106
# via burr
101-
filelock==3.15.3
107+
filelock==3.15.4
102108
# via huggingface-hub
103109
fonttools==4.53.0
104110
# via matplotlib
@@ -107,7 +113,7 @@ free-proxy==1.1.1
107113
frozenlist==1.4.1
108114
# via aiohttp
109115
# via aiosignal
110-
fsspec==2024.6.0
116+
fsspec==2024.6.1
111117
# via huggingface-hub
112118
furo==2024.5.6
113119
# via scrapegraphai
@@ -119,7 +125,7 @@ google==3.0.0
119125
# via scrapegraphai
120126
google-ai-generativelanguage==0.6.4
121127
# via google-generativeai
122-
google-api-core==2.19.0
128+
google-api-core==2.19.1
123129
# via google-ai-generativelanguage
124130
# via google-api-python-client
125131
# via google-generativeai
@@ -135,7 +141,7 @@ google-auth-httplib2==0.2.0
135141
# via google-api-python-client
136142
google-generativeai==0.5.4
137143
# via langchain-google-genai
138-
googleapis-common-protos==1.63.1
144+
googleapis-common-protos==1.63.2
139145
# via google-api-core
140146
# via grpcio-status
141147
graphviz==0.20.3
@@ -179,6 +185,10 @@ idna==3.7
179185
# via yarl
180186
imagesize==1.4.1
181187
# via sphinx
188+
importlib-metadata==8.0.0
189+
# via sphinx
190+
importlib-resources==6.4.0
191+
# via matplotlib
182192
iniconfig==2.0.0
183193
# via pytest
184194
jinja2==3.1.4
@@ -187,7 +197,7 @@ jinja2==3.1.4
187197
# via fastapi
188198
# via pydeck
189199
# via sphinx
190-
jiter==0.4.2
200+
jiter==0.5.0
191201
# via anthropic
192202
jmespath==1.0.1
193203
# via boto3
@@ -230,7 +240,7 @@ langchain-openai==0.1.6
230240
# via scrapegraphai
231241
langchain-text-splitters==0.0.2
232242
# via langchain
233-
langsmith==0.1.80
243+
langsmith==0.1.82
234244
# via langchain
235245
# via langchain-community
236246
# via langchain-core
@@ -274,7 +284,7 @@ numpy==1.26.4
274284
# via pydeck
275285
# via sf-hamilton
276286
# via streamlit
277-
openai==1.35.0
287+
openai==1.35.6
278288
# via burr
279289
# via langchain-openai
280290
orjson==3.10.5
@@ -392,11 +402,11 @@ rpds-py==0.18.1
392402
# via referencing
393403
rsa==4.9
394404
# via google-auth
395-
s3transfer==0.10.1
405+
s3transfer==0.10.2
396406
# via boto3
397407
semchunk==1.0.1
398408
# via scrapegraphai
399-
sf-hamilton==1.66.1
409+
sf-hamilton==1.67.0
400410
# via burr
401411
shellingham==1.5.4
402412
# via typer
@@ -437,9 +447,9 @@ sqlalchemy==2.0.31
437447
# via langchain-community
438448
starlette==0.37.2
439449
# via fastapi
440-
streamlit==1.35.0
450+
streamlit==1.36.0
441451
# via burr
442-
tenacity==8.4.1
452+
tenacity==8.4.2
443453
# via langchain
444454
# via langchain-community
445455
# via langchain-core
@@ -453,6 +463,8 @@ tokenizers==0.19.1
453463
# via anthropic
454464
toml==0.10.2
455465
# via streamlit
466+
tomli==2.0.1
467+
# via pytest
456468
toolz==0.12.1
457469
# via altair
458470
tornado==6.4.1
@@ -468,7 +480,9 @@ trafilatura==1.10.0
468480
typer==0.12.3
469481
# via fastapi-cli
470482
typing-extensions==4.12.2
483+
# via altair
471484
# via anthropic
485+
# via anyio
472486
# via fastapi
473487
# via fastapi-pagination
474488
# via google-generativeai
@@ -480,9 +494,11 @@ typing-extensions==4.12.2
480494
# via pyee
481495
# via sf-hamilton
482496
# via sqlalchemy
497+
# via starlette
483498
# via streamlit
484499
# via typer
485500
# via typing-inspect
501+
# via uvicorn
486502
typing-inspect==0.9.0
487503
# via dataclasses-json
488504
# via sf-hamilton
@@ -496,7 +512,7 @@ undetected-playwright==0.3.0
496512
# via scrapegraphai
497513
uritemplate==4.1.1
498514
# via google-api-python-client
499-
urllib3==2.2.2
515+
urllib3==1.26.19
500516
# via botocore
501517
# via courlan
502518
# via htmldate
@@ -513,3 +529,6 @@ websockets==12.0
513529
# via uvicorn
514530
yarl==1.9.4
515531
# via aiohttp
532+
zipp==3.19.2
533+
# via importlib-metadata
534+
# via importlib-resources

requirements.lock

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,26 @@ aiosignal==1.3.1
1515
# via aiohttp
1616
annotated-types==0.7.0
1717
# via pydantic
18-
anthropic==0.28.1
18+
anthropic==0.30.0
1919
# via langchain-anthropic
2020
anyio==4.4.0
2121
# via anthropic
2222
# via groq
2323
# via httpx
2424
# via openai
25+
async-timeout==4.0.3
26+
# via aiohttp
27+
# via langchain
2528
attrs==23.2.0
2629
# via aiohttp
2730
babel==2.15.0
2831
# via courlan
2932
beautifulsoup4==4.12.3
3033
# via google
3134
# via scrapegraphai
32-
boto3==1.34.129
35+
boto3==1.34.134
3336
# via langchain-aws
34-
botocore==1.34.129
37+
botocore==1.34.134
3538
# via boto3
3639
# via s3transfer
3740
cachetools==5.3.3
@@ -58,22 +61,24 @@ distro==1.9.0
5861
# via anthropic
5962
# via groq
6063
# via openai
64+
exceptiongroup==1.2.1
65+
# via anyio
6166
faiss-cpu==1.8.0
6267
# via scrapegraphai
63-
filelock==3.15.3
68+
filelock==3.15.4
6469
# via huggingface-hub
6570
free-proxy==1.1.1
6671
# via scrapegraphai
6772
frozenlist==1.4.1
6873
# via aiohttp
6974
# via aiosignal
70-
fsspec==2024.6.0
75+
fsspec==2024.6.1
7176
# via huggingface-hub
7277
google==3.0.0
7378
# via scrapegraphai
7479
google-ai-generativelanguage==0.6.4
7580
# via google-generativeai
76-
google-api-core==2.19.0
81+
google-api-core==2.19.1
7782
# via google-ai-generativelanguage
7883
# via google-api-python-client
7984
# via google-generativeai
@@ -89,7 +94,7 @@ google-auth-httplib2==0.2.0
8994
# via google-api-python-client
9095
google-generativeai==0.5.4
9196
# via langchain-google-genai
92-
googleapis-common-protos==1.63.1
97+
googleapis-common-protos==1.63.2
9398
# via google-api-core
9499
# via grpcio-status
95100
graphviz==0.20.3
@@ -125,7 +130,7 @@ idna==3.7
125130
# via httpx
126131
# via requests
127132
# via yarl
128-
jiter==0.4.2
133+
jiter==0.5.0
129134
# via anthropic
130135
jmespath==1.0.1
131136
# via boto3
@@ -162,7 +167,7 @@ langchain-openai==0.1.6
162167
# via scrapegraphai
163168
langchain-text-splitters==0.0.2
164169
# via langchain
165-
langsmith==0.1.80
170+
langsmith==0.1.82
166171
# via langchain
167172
# via langchain-community
168173
# via langchain-core
@@ -189,7 +194,7 @@ numpy==1.26.4
189194
# via langchain-aws
190195
# via langchain-community
191196
# via pandas
192-
openai==1.35.0
197+
openai==1.35.6
193198
# via langchain-openai
194199
orjson==3.10.5
195200
# via langsmith
@@ -259,7 +264,7 @@ requests==2.32.3
259264
# via tiktoken
260265
rsa==4.9
261266
# via google-auth
262-
s3transfer==0.10.1
267+
s3transfer==0.10.2
263268
# via boto3
264269
semchunk==1.0.1
265270
# via scrapegraphai
@@ -276,7 +281,7 @@ soupsieve==2.5
276281
sqlalchemy==2.0.31
277282
# via langchain
278283
# via langchain-community
279-
tenacity==8.4.1
284+
tenacity==8.4.2
280285
# via langchain
281286
# via langchain-community
282287
# via langchain-core
@@ -297,6 +302,7 @@ trafilatura==1.10.0
297302
# via scrapegraphai
298303
typing-extensions==4.12.2
299304
# via anthropic
305+
# via anyio
300306
# via google-generativeai
301307
# via groq
302308
# via huggingface-hub
@@ -316,7 +322,7 @@ undetected-playwright==0.3.0
316322
# via scrapegraphai
317323
uritemplate==4.1.1
318324
# via google-api-python-client
319-
urllib3==2.2.2
325+
urllib3==1.26.19
320326
# via botocore
321327
# via courlan
322328
# via htmldate

requirements.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)