의료진 수 firecrawl 해킹, 만약 필요하다면 직접 스크래핑으로 해결 필요
This commit is contained in:
1 parent
09bb7a71ee
commit
e8406dc0ee
2 files changed
+40
-2
No files matched your search
@@ -158,13 +158,14 @@ class FirecrawlClient:
|
||||
"url": hospital_url,
|
||||
"formats": ["json"],
|
||||
"jsonOptions": {
|
||||
"prompt": "Extract: hospital name, overall rating (out of 10), total review count, doctors with names/ratings/review counts/specialties, procedures, address, badges",
|
||||
"prompt": "Extract: hospital name, overall rating (out of 10), total review count, number of major staffs, all doctor with names/ratings/review counts/specialties(please check html, there are not only 4 doctors!), procedures, address, badges.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"hospitalName": {"type": "string"},
|
||||
"rating": {"type": "number"},
|
||||
"totalReviews": {"type": "number"},
|
||||
"totalMajorStaffs" : {"type" : "number"},
|
||||
"doctors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -202,7 +203,8 @@ class FirecrawlClient:
|
||||
"rating": raw.get("rating"),
|
||||
"ratingScale": "/10",
|
||||
"totalReviews": raw.get("totalReviews", 0),
|
||||
"doctors": (raw.get("doctors") or [])[:10],
|
||||
"doctors": (raw.get("doctors") or []),
|
||||
"totalMajorStaffs": raw.get("totalMajorStaffs", 0),
|
||||
"procedures": raw.get("procedures", []),
|
||||
"address": raw.get("address", ""),
|
||||
"badges": raw.get("badges", []),
|
||||
|
||||
Reference in new issue
Block a user