polipus icon indicating copy to clipboard operation
polipus copied to clipboard

[WIP] Plugins architecture proposal

Open taganaka opened this issue 10 years ago • 4 comments

taganaka avatar Jun 29 '14 21:06 taganaka

cc @tmaier

taganaka avatar Jun 29 '14 21:06 taganaka

Coverage Status

Coverage decreased (-0.62%) when pulling 02ee4841c3280f8316ee805d33da29ce0f22fbf1 on plugins into 0e4b19adbce8d408994ce83b43ea6fe148821a55 on master.

coveralls avatar Jun 29 '14 21:06 coveralls

API Proposal:

Polipus.crawler(name, starting_urls, options) do |crawler|
  crawler.register_plugin(Class::Name, plugin_options)
end

taganaka avatar Jun 29 '14 21:06 taganaka

  1. Shall a plugin be able to be registered more than once?
  2. Shall it be possible to unregister a plugin again? This way, we could register some default plugins. If someone does not like them, they can unregister them by themself. This would also be necessary to stay backwards compatible: We automatically register the plugins resulting from the old options. And give a deprecation warning.

tmaier avatar Jun 30 '14 08:06 tmaier