spotlight

Search engine parsing for Crystal

Spotlight

Search engine parsing for Crystal. Inspired by the search-engine-parser Python library. Currently includes support for:

  • Google
  • Bing
  • DuckDuckGo

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      spotlight:
        github: watzon/spotlight
    
  2. Run shards install

Usage

require "spotlight"

ddg = Spotlight::DuckDuckGo.new
ddg.search("crystal language")
# => [#<Spotlight::Result:0x7fd6a131f090
#     @desc= "Type system. Crystal is statically type checked, so any type errors will be caught early by the compiler rather than fail on runtime. Moreover, and to keep the language clean, Crystal has built-in type inference, so most type annotations are unneeded.",
#     @link="https://crystal-lang.org/",
#     @title="Crystal">, ...]

Contributing

  1. Fork it (https://github.com/watzon/spotlight/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

spotlight

Owner
Statistic
  • 10
  • 0
  • 0
  • 0
  • 1
  • about 5 years ago
  • November 11, 2019
License

MIT License

Links
Synced at

Sun, 17 Nov 2024 09:45:42 GMT

Languages