JsonGenius
1.0.0
Jsongenius هي واجهة برمجة تطبيقات مستضافة ذاتيًا تستخلص البيانات المنظمة التي وصفها مخطط JSON. توفير أي عنوان URL ومخطط JSON المطلوب ، وسيقوم Jsongenius بإرجاع البيانات المنظمة من الموقع.

OPEN_AI_KEY - مفتاح API لـ Openai. يمكنك الحصول على واحدة مجانًا هنا. يجب تعيين هذا كمتغير بيئة. git clone https://github.com/semanser/jsongenius
cd jsongenius
export OPEN_AI_KEY= < your key here >
docker compose up ستكون واجهة برمجة التطبيقات متاحة على http: // localhost: 3001. يمكنك تغيير المنفذ عن طريق تحرير ملف docker-compose.yml .
git clone https://github.com/semanser/jsongenius
cd jsongenius
export OPEN_AI_KEY= < your key here >
go build .
./jsongeniusتقبل نقطة النهاية هذه جسم JSON مع الحقول التالية:
url : عنوان URL للموقع لكشطschema : مخطط JSON لاستخدامه لاستخراج البيانات من الموقع. يجب أن يكون المخطط كائن مخطط JSON صالح. اقرأ المزيد عن مخطط JSON هنا. curl -X POST -H " Content-Type: application/json " -d ' {
"url": "https://www.amazon.com/s?k=gaming+headsets",
"schema": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The product name"
},
"price": {
"type": "number",
"description": "The price of the product in USD"
}
}
}
}
}
}
} ' http://localhost:3001/lookupWS_URL الذي يشير إلى نقطة نهاية بروتوكول Chrome DevTools. ستستخدم Jsongenius ذلك بدلاً من تدوير مثيل الكروم الخاص به.