【스마트 모드】【순서도 모드】Webhook 사용 방법 | 웹 스크래핑 툴 | ScrapeStorm
2023-03-16 16:18:53
8214 차
개요:이 튜토리얼에서는 Webhook 사용 방법에 대해 보여줍니다. ScrapeStorm무료 다운로드
ScrapeStorm은 웹훅을 지원합니다. 이 기능을 사용하면 스크래핑된 데이터를 HTTP/HTTPS URL로 내보낼 수 있습니다.
이 기능은 다음과 같이 실행창에서 설정할 수 있습니다.

Webhook 기능이 유효하게 되면 스크래핑 된 데이터는 JSON 형식으로 전송됩니다. 또한 작업이 완료되면 웹훅을 통해 알림이 갑니다.
HTTP 헤더는: "Content-Type: application/json; charset=utf-8".
데이터 전송 예시:
{
"task_id": 3920415, // Scraping task ID, find it by "View All Tasks"
"task_name": "Scraping task name", // Scraping task name
"type": "data", //This is a webhook of scraped data
"urls": [ //The entries of the scraping task
"http://www.*****.com/list",
"http://www.*****.com/list2"
],
"sign": "**********************", // md5(webhook_token+timestamp)
"timestamp": 1555326657, // current timestamp
"data_list": [ // Scrape data list
{
"_id": "0000000000001", // data ID
"data": {
"title": "Landscape",
"url": "http://www.*****.com/scenery/"
} // Scrape data field content
}
]
}
종료 알림 예시:
{
"task_id": 3920415, // Scraping task ID, find it by "View All Tasks"
"task_name": "Scraping task name", // Scraping task name
"type": "finish", //This is a webhook of finish notification
"urls": [ //The entries of the scraping task
"http://www.*****.com/list",
"http://www.*****.com/list2"
],
"sign": "**********************", // md5(webhook_token+timestamp)
"timestamp": 1555326657 // current timestamp
}