Advertisement
cr0hn

json-crawler-definition.json

Dec 15th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.18 KB | None | 0 0
  1. {
  2.   "name": "myCrawler",
  3.   "config": {
  4.     "logger": "mylogger",
  5.     "sentryDSN": "asdf",
  6.     "remoteLoggerDSN": ""
  7.   },
  8.   "sources": [
  9.     {
  10.       "name": "MyRouter",
  11.       "type": "IP",
  12.       "config": {
  13.         "addr": "127.0.0.1",
  14.         "port": 9000
  15.       }
  16.     }
  17.   ],
  18.   "input": {
  19.     "type": "rest",
  20.     "config": {
  21.       "httpMethod": "GET",
  22.       "httpType": "json",
  23.       "httpHeaders": {
  24.         "header1": "$VAR$",
  25.         "header2": "value2"
  26.       },
  27.       "data": "my=ad5a&asdf=asdf"
  28.     }
  29.   },
  30.   "extractors": [],
  31.   "model": {
  32.     "name": "my_model_1",
  33.     "fields": [
  34.       {
  35.         "name": "url",
  36.         "type": "text",
  37.         "key": true
  38.       },
  39.       {
  40.         "name": "description",
  41.         "type": "text"
  42.       }
  43.     ],
  44.     "mappers": [
  45.       {
  46.         "database": {
  47.           "name": "my_database",
  48.           "host": "127.0.0.1",
  49.           "port": "27017",
  50.           "user": "user",
  51.           "database": "db",
  52.           "collection": "collection",
  53.           "password": "password"
  54.         }
  55.       }
  56.     ]
  57.   },
  58.   "hooks": [
  59.     {
  60.       "type": "slack",
  61.       "config": {
  62.         "url": "SLACK_URL"
  63.       }
  64.     }
  65.   ]
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement