opengraph.cr v0.1.0
opengraph.cr
Crystal wrapper for the Open Graph protocol, allowing you to parse Open Graph meta tags and extract valuable information.
Installation
-
Add the dependency to your
shard.yml
:dependencies: opengraph: github: watzon/opengraph.cr
-
Run
shards install
Usage
require "opengraph"
og = OpenGraph.from_url("css-tricks.com")
# og = OpenGraph.parse("<!-- RAW HTML -->")
puts og.website?
# => true
puts og["title"]?
# => "CSS-Tricks"
puts og["image"]?
# => "https://css-tricks.com/wp-content/uploads/2014/03/css-tricks-star.png"
Contributing
- Fork it (https://github.com/watzon/opengraph/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Chris Watson - creator and maintainer
Repository
opengraph.cr
Owner
Statistic
- 7
- 1
- 0
- 0
- 1
- over 4 years ago
- May 28, 2019
License
MIT License
Links
Synced at
Sun, 17 Nov 2024 01:52:49 GMT
Languages