Module: LoyalSpider::EntityListerAble::ClassMethods
- Defined in:
- lib/loyal_spider/ables/entity_lister_able.rb
Instance Method Summary collapse
-
#config_loyal_spider_entity_lister(options = {}) ⇒ Object
options: - url_format - url_format_first - url_format_options.
- #entity_lister_options ⇒ Object
-
#paged_fetch(page, options = {}, &block) ⇒ Object
按页抓取.
Instance Method Details
#config_loyal_spider_entity_lister(options = {}) ⇒ Object
options:
- url_format
- url_format_first
-
21 22 23 24 25 26 27 |
# File 'lib/loyal_spider/ables/entity_lister_able.rb', line 21 def config_loyal_spider_entity_lister ={} @entity_lister_options ||= self.( self..delete(:fetch_options) || {} ) end |
#entity_lister_options ⇒ Object
35 36 37 |
# File 'lib/loyal_spider/ables/entity_lister_able.rb', line 35 def @entity_lister_options ||= {} end |
#paged_fetch(page, options = {}, &block) ⇒ Object
按页抓取
40 41 42 43 44 |
# File 'lib/loyal_spider/ables/entity_lister_able.rb', line 40 def paged_fetch page, ={}, &block lister = self.new lister.current_page = page lister.fetch , &block end |