استخراج الموقع
ScrapeWebsiteTool
Section titled “ScrapeWebsiteTool”أداة مصممة لاستخراج وقراءة محتوى موقع محدد. قادرة على التعامل مع أنواع مختلفة من صفحات الويب عن طريق إجراء طلبات HTTP وتحليل محتوى HTML المستلم. يمكن أن تكون هذه الأداة مفيدة بشكل خاص لمهام استخراج البيانات من الويب وجمع البيانات أو استخراج معلومات محددة من المواقع.
التثبيت
Section titled “التثبيت”ثبّت حزمة crewai_tools
pip install 'crewai[tools]'from crewai_tools import ScrapeWebsiteTool
# To enable scrapping any website it finds during it's executiontool = ScrapeWebsiteTool()
# Initialize the tool with the website URL,# so the agent can only scrap the content of the specified websitetool = ScrapeWebsiteTool(website_url='https://www.example.com')
# Extract the text from the sitetext = tool.run()print(text)المعاملات
Section titled “المعاملات”| المعامل | النوع | الوصف |
|---|---|---|
| website_url | string | إلزامي عنوان URL للموقع لقراءة الملف. هذا هو المدخل الأساسي للأداة، يحدد محتوى أي موقع يجب استخراجه وقراءته. |