SeleniumScrapingTool
이 도구는 현재 개발 중이다. 기능을 개선해 나가는 과정에서 사용자가 예상치 못한 동작을 마주할 수 있다.
여러분의 피드백은 개선을 위한 소중한 자산이다.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SeleniumScrapingTool은 Selenium을 사용해 특정 웹사이트의 콘텐츠를 추출하고 읽도록 설계됐다.
SeleniumScrapingToolpip install 'crewai[tools]'
from crewai_tools import SeleniumScrapingTool
# 예제 1:
# 파라미터 없이 도구를 초기화하여 현재 페이지를 스크랩
tool = SeleniumScrapingTool()
# 예제 2:
# 특정 URL의 전체 웹페이지를 스크랩
tool = SeleniumScrapingTool(website_url='https://example.com')
# 예제 3:
# 웹페이지의 특정 CSS 엘리먼트를 대상으로 스크랩
tool = SeleniumScrapingTool(
website_url='https://example.com',
css_element='.main-content'
)
# 예제 4:
# 추가 파라미터를 사용해 맞춤형 스크랩 수행
tool = SeleniumScrapingTool(
website_url='https://example.com',
css_element='.main-content',
cookie={'name': 'user', 'value': 'John Doe'},
wait_time=10
)
| 인자 | 타입 | 설명 |
|---|---|---|
| website_url | string | 필수. 스크래핑할 웹사이트의 URL을 지정한다. |
| css_element | string | 필수. 웹사이트에서 타겟으로 할 특정 엘리먼트의 CSS 선택자를 지정한다. 이를 통해 웹페이지의 특정 부분만 집중적으로 스크래핑할 수 있다. |
| cookie | object | 선택. 로그인된 세션을 시뮬레이션하여 제한된 콘텐츠에 접근할 때 유용한 쿠키 정보를 담은 딕셔너리다. |
| wait_time | int | 선택. 스크래핑 전 지연 시간(초 단위)을 지정한다. 이를 통해 웹사이트와 동적 콘텐츠가 완전히 로드될 때까지 기다릴 수 있다. |
SeleniumScrapingTool은 현재 활발히 개발 중이므로, 인자와 기능은 시간이 지남에 따라 변경될 수 있다.
사용자는 최신 버전으로 업데이트를 유지하고, 문제나 개선 사항을 보고할 것을 권장한다.