Skip to content

Instantly share code, notes, and snippets.

@chiwent
Created August 31, 2018 08:09
Show Gist options
  • Save chiwent/9638875fba29914c09afa5b046fd23d5 to your computer and use it in GitHub Desktop.
Save chiwent/9638875fba29914c09afa5b046fd23d5 to your computer and use it in GitHub Desktop.
wechat-rss-agent
{
"schema_version": 1,
"name": "微信公众号",
"description": "No description provided",
"source_url": false,
"guid": "c0be876a712baf52fa4270d6b1744432",
"tag_fg_color": "#ffffff",
"tag_bg_color": "#00b050",
"icon": "leaf",
"exported_at": "2018-08-31T08:09:17Z",
"agents": [
{
"type": "Agents::DeDuplicationAgent",
"name": "微信公众号 #3 去除重复",
"disabled": false,
"guid": "3250efcc923ce4c10b30763c6e0365b6",
"options": {
"property": "{{title}}",
"lookback": "0",
"expected_update_period_in_days": "20"
},
"keep_events_for": 15552000,
"propagate_immediately": true
},
{
"type": "Agents::WebsiteAgent",
"name": "微信公众号 #2 获取文章列表",
"disabled": false,
"guid": "606e3875f2368e053aace5f3d9ceeb9d",
"options": {
"expected_update_period_in_days": "20",
"url": [
"http://chuansong.me/account/FeZaoDuKe",
"http://chuansong.me/account/FrontDev",
"http://chuansong.me/account/qianduan1024"
],
"type": "html",
"mode": "on_change",
"extract": {
"url": {
"css": "/html/body/div[2]/div[2]/div/div/div/div/div[3]/div[1]/div/div/div[2]/div/div[1]/div/div/div/div/div/div/h2/span/a",
"value": "@href"
},
"title": {
"css": "/html/body/div[2]/div[2]/div/div/div/div/div[3]/div[1]/div/div/div[2]/div/div[1]/div/div/div/div/div/div/h2/span/a",
"value": "normalize-space(.)"
}
},
"events_order": [
[
"{{_index_}}",
"number",
"true"
]
],
"template": {
"url": "{{ url | to_uri: \"http://chuansong.me\" }}"
}
},
"schedule": "never",
"keep_events_for": 7776000,
"propagate_immediately": true
},
{
"type": "Agents::WebsiteAgent",
"name": "微信公众号 #1 搜索账号",
"disabled": false,
"guid": "a4c7bc9e333c38cbb4fdfa3a24c191ed",
"options": {
"expected_update_period_in_days": "4",
"_comment": [
"前端早读课",
"前端大全",
"前端开发"
],
"url": [
"http://chuansong.me/search?q=前端早读课",
"http://chuansong.me/search?q=前端大全",
"http://chuansong.me/search?q=前端开发"
],
"type": "html",
"mode": "on_change",
"extract": {
"url": {
"xpath": "//*[@id=\"ld_pb7M6s_32122\"]/div[1]/div[1]/div/div/div[2]/div[1]/a",
"value": "@href"
}
}
},
"schedule": "every_1d",
"keep_events_for": 86400,
"propagate_immediately": false
},
{
"type": "Agents::DataOutputAgent",
"name": "微信公众号 #5 输出RSS",
"disabled": false,
"guid": "cbc2ced20c71d435a5bd375b3e580797",
"options": {
"secrets": [
"wechat2rss"
],
"expected_receive_period_in_days": "20",
"template": {
"title": "huginn-wechat2rss",
"description": "huginn-wechat2rss",
"item": {
"title": "{{title}}",
"description": "{{ desciption | replace: 'data-src', 'src' }}",
"link": "{{url}}"
},
"link": "http://chuansong.me",
"icon": "https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/favicon22c41b.ico"
},
"ns_media": "true",
"events_to_show": "300"
},
"propagate_immediately": true
},
{
"type": "Agents::WebsiteAgent",
"name": "微信公众号 #4 获取单篇文章全文",
"disabled": false,
"guid": "f7c52fcd85cea0d7426978202f4dc692",
"options": {
"expected_update_period_in_days": "20",
"url_from_event": "{{url}}",
"type": "html",
"mode": "merge",
"extract": {
"desciption": {
"css": "#js_content",
"value": "./node()"
},
"title": {
"css": "#activity-name",
"value": "string(.)"
}
}
},
"schedule": "never",
"keep_events_for": 604800,
"propagate_immediately": true
}
],
"links": [
{
"source": 0,
"receiver": 4
},
{
"source": 1,
"receiver": 0
},
{
"source": 2,
"receiver": 1
},
{
"source": 4,
"receiver": 3
}
],
"control_links": [
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment