scrapinghub-image-casperjs

Recommended base Docker image for CasperJS spiders at Scrapinghub

  • 所有者: scrapinghub/scrapinghub-image-casperjs
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

scrapinghub-image-casperjs

Recommended base Docker image for CasperJS spiders at Scrapinghub.

shub-exec

shub-exec is a utility that converts project and spider settings to environment variables and
job arguments to CasperJS command line options.

This tool can be used in start-crawl
script as last command that exec the real spider script, but before it setups environment from settings
in SHUB_SETTINGS environment variable and arguments according to SHUB_JOB_DATA environment variable.

An example start-crawl for CasperJS is:

#/bin/sh
exec shub-exec -- casperjs --debug /app/$SHUB_SPIDER

For a job whose spider name is simple.js and job arguments are url=http://scrapinghub.com it will run:

casperjs --debug /app/simple.js --url=http://scrapinghub.com

It's important to have -- before the positional arguments, it helps to distinguish shub-exec options
from script options.

If the job has some setting set, i.e. LOGLEVEL=DEBUG, it will be available in CasperJS
process environment as 'LOGLEVEL' with value 'DEBUG'.

概覽

名稱與所有者scrapinghub/scrapinghub-image-casperjs
主編程語言Python
編程語言Python (語言數: 1)
平台
許可證
發布數6
最新版本名稱0.0.6 (發布於 )
第一版名稱0.0.1 (發布於 )
創建於2017-05-05 19:09:39
推送於2017-06-07 17:52:52
最后一次提交2017-06-07 18:52:31
星數0
關注者數3
派生數1
提交數19
已啟用問題?
問題數0
打開的問題數0
拉請求數4
打開的拉請求數0
關閉的拉請求數0
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部