Created
July 25, 2019 10:54
-
-
Save lifesign/b38dc0b22750e6458f5634254e58b970 to your computer and use it in GitHub Desktop.
Huginn+bark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "优惠信息", | |
"description": "No description provided", | |
"source_url": false, | |
"guid": "863b90779850e0325ff6e55a6019d9d5", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#5bc0de", | |
"icon": "gear", | |
"exported_at": "2018-09-07T04:06:31Z", | |
"agents": [ | |
{ | |
"type": "Agents::WebsiteAgent", | |
"name": "抓取优惠信息", | |
"disabled": false, | |
"guid": "11f00ab6f5fd25d66b5462a1b86aae05", | |
"options": { | |
"expected_update_period_in_days": "2", | |
"url": "https://faxian.smzdm.com/", | |
"type": "html", | |
"mode": "on_change", | |
"extract": { | |
"url": { | |
"xpath": "//*[@id=\"feed-main-list\"]/li/div/h5/a", | |
"value": "@href" | |
}, | |
"title": { | |
"xpath": "//*[@id=\"feed-main-list\"]/li/div/h5/a", | |
"value": "text()" | |
} | |
} | |
}, | |
"schedule": "every_10m", | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
}, | |
{ | |
"type": "Agents::WebsiteAgent", | |
"name": "V2EX二手交易", | |
"disabled": false, | |
"guid": "2900ce37b0906013cbef5c9902a09642", | |
"options": { | |
"expected_update_period_in_days": "2", | |
"url": "https://www.v2ex.com/?tab=deals", | |
"type": "html", | |
"mode": "on_change", | |
"extract": { | |
"url": { | |
"xpath": "//*[@id=\"Main\"]/div[2]/div/table/tr/td[3]/span[1]/a", | |
"value": "@href" | |
}, | |
"title": { | |
"xpath": "//*[@id=\"Main\"]/div[2]/div/table/tr/td[3]/span[1]/a", | |
"value": "text()" | |
} | |
} | |
}, | |
"schedule": "every_10m", | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
}, | |
{ | |
"type": "Agents::DeDuplicationAgent", | |
"name": "去重", | |
"disabled": false, | |
"guid": "391763b234b8a22ca0e8e736dabdcb7c", | |
"options": { | |
"property": "{{message}}", | |
"lookback": "100", | |
"expected_update_period_in_days": "1" | |
}, | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
}, | |
{ | |
"type": "Agents::EventFormattingAgent", | |
"name": "V2EX url", | |
"disabled": false, | |
"guid": "41da102a4b0e5bf23f7aea0fd96a7ac5", | |
"options": { | |
"instructions": { | |
"url": "https://www.v2ex.com{{url}}" | |
}, | |
"mode": "clean" | |
}, | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
}, | |
{ | |
"type": "Agents::TriggerAgent", | |
"name": "筛选优惠", | |
"disabled": false, | |
"guid": "5dc7aa3d9b10e225ae289fc32982f7d8", | |
"options": { | |
"expected_receive_period_in_days": "2", | |
"keep_event": "true", | |
"rules": [ | |
{ | |
"type": "regex", | |
"value": "item1|item2|item3", | |
"path": "title" | |
} | |
], | |
"message": "{{title}}?url={{url}}" | |
}, | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
}, | |
{ | |
"type": "Agents::WebsiteAgent", | |
"name": "HTTP GET", | |
"disabled": false, | |
"guid": "c25ea9e1ece9314fa613d0600dcfa7e5", | |
"options": { | |
"expected_update_period_in_days": "2", | |
"url": "$bark url/{{message}}", | |
"type": "json", | |
"mode": "on_change" | |
}, | |
"schedule": "never", | |
"keep_events_for": 0, | |
"propagate_immediately": true | |
} | |
], | |
"links": [ | |
{ | |
"source": 0, | |
"receiver": 4 | |
}, | |
{ | |
"source": 1, | |
"receiver": 3 | |
}, | |
{ | |
"source": 2, | |
"receiver": 5 | |
}, | |
{ | |
"source": 3, | |
"receiver": 4 | |
}, | |
{ | |
"source": 4, | |
"receiver": 2 | |
} | |
], | |
"control_links": [ | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment