Class Yapra::Plugin::Publish::OnMemoryDownload
In: lib-plugins/yapra/plugin/publish/on_memory_download.rb
Parent: Yapra::Plugin::MechanizeBase

Publish::OnMemoryDownload — Yuanying

download web resource and set to item attribute.

example:

    - module: Publish::OnMemoryDownload
      config:
        regexp: http://www\.yahoo\.co\.jp/*
        attribute: binary_image
        before_hook: "agent.get('http://www.yahoo.co.jp/'); sleep 1"
        url:
          attribute: link
          replace: index(\d*?)\.html
          to: file\1.zip
        referrer:
          attribute: link
          replace: 'zip'
          to: 'html'

Methods

construct_data   download   run   save  

Public Instance methods

Protected Instance methods

[Validate]