Update README.md

This commit is contained in:
Nicolas 2024-09-05 15:30:10 -03:00 committed by GitHub
parent cb630bfc34
commit b3f21d437b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,15 +402,11 @@ class TopArticlesSchema(BaseModel):
top: List[ArticleSchema] = Field(..., max_items=5, description="Top 5 stories")
data = app.scrape_url('https://news.ycombinator.com', {
'extractorOptions': {
'extractionSchema': TopArticlesSchema.model_json_schema(),
'mode': 'llm-extraction'
},
'pageOptions':{
'onlyMainContent': True
'extract': {
'schema': TopArticlesSchema.model_json_schema()
}
})
print(data["llm_extraction"])
print(data["extract"])
```
## Using the Node SDK