Advertisement
Guest User

PhantomJs Cloud Agent Demo

a guest
Dec 21st, 2016
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.08 KB | None | 0 0
  1. {
  2.   "schema_version": 1,
  3.   "name": "PhantomJs Cloud Demo",
  4.   "description": "Example usage with PhantomJs Cloud (https://phantomjscloud.com/).\r\nYou'll need to sign up and get an API key for this to work.",
  5.   "source_url": false,
  6.   "guid": "32329783da28399392645cff5a14ab9f",
  7.   "tag_fg_color": "#ffffff",
  8.   "tag_bg_color": "#5bc0de",
  9.   "icon": null,
  10.   "exported_at": "2016-12-21T16:30:44Z",
  11.   "agents": [
  12.     {
  13.       "type": "Agents::DataOutputAgent",
  14.       "name": "PhantomJS Cloud - Out - RSS",
  15.       "disabled": false,
  16.       "guid": "37094003a5077e78ec3114a475d2382c",
  17.       "options": {
  18.         "secrets": [
  19.           "phantom"
  20.         ],
  21.         "expected_receive_period_in_days": 2,
  22.         "template": {
  23.           "title": "XKCD comics as a feed",
  24.           "description": "This is a feed of recent XKCD comics, generated by Huginn",
  25.           "item": {
  26.             "title": "{{title}}",
  27.             "description": "{{body}}"
  28.           }
  29.         }
  30.       },
  31.       "propagate_immediately": false
  32.     },
  33.     {
  34.       "type": "Agents::WebsiteAgent",
  35.       "name": "PhantomJS Cloud - Process - Fetch Page",
  36.       "disabled": false,
  37.       "guid": "3bc94a9d728abd43439c797518089513",
  38.       "options": {
  39.         "expected_update_period_in_days": "2",
  40.         "url_from_event": "{{url}}",
  41.         "type": "html",
  42.         "mode": "on_change",
  43.         "extract": {
  44.           "title": {
  45.             "css": "title",
  46.             "value": "normalize-space(.)"
  47.           },
  48.           "body": {
  49.             "css": "body #comic",
  50.             "value": "./node()"
  51.           }
  52.         }
  53.       },
  54.       "schedule": "every_1d",
  55.       "keep_events_for": 3600,
  56.       "propagate_immediately": true
  57.     },
  58.     {
  59.       "type": "Agents::PhantomJsCloudAgent",
  60.       "name": "PhantomJS Cloud - Process - Options",
  61.       "disabled": false,
  62.       "guid": "6580abaadb5b70abace1f77e299c38ea",
  63.       "options": {
  64.         "mode": "clean",
  65.         "api_key": "{% credential phantomjs_cloud %}",
  66.         "url": "{{url}}",
  67.         "render_type": "html",
  68.         "output_as_json_radio": "false",
  69.         "output_as_json": "false",
  70.         "ignore_images_radio": "false",
  71.         "ignore_images": "false",
  72.         "user_agent": "Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+",
  73.         "wait_interval": "1000"
  74.       },
  75.       "schedule": "every_12h",
  76.       "keep_events_for": 3600,
  77.       "propagate_immediately": false
  78.     },
  79.     {
  80.       "type": "Agents::RssAgent",
  81.       "name": "PhantomJS Cloud - In - RSS ",
  82.       "disabled": false,
  83.       "guid": "ddbd7c6b7a53f4e4a342574a9a3f8b8c",
  84.       "options": {
  85.         "expected_update_period_in_days": "5",
  86.         "clean": "true",
  87.         "url": "http://xkcd.com/rss.xml"
  88.       },
  89.       "schedule": "every_1d",
  90.       "keep_events_for": 0
  91.     }
  92.   ],
  93.   "links": [
  94.     {
  95.       "source": 1,
  96.       "receiver": 0
  97.     },
  98.     {
  99.       "source": 2,
  100.       "receiver": 1
  101.     },
  102.     {
  103.       "source": 3,
  104.       "receiver": 2
  105.     }
  106.   ],
  107.   "control_links": [
  108.  
  109.   ]
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement