All Projects → claytongentry → furlex

claytongentry / furlex

Licence: other
A structured data extraction tool written in Elixir

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to furlex

SeoTags
SeoTags create all SEO tags you need such as meta, link, twitter card (twitter:), open graph (og:), and JSON-LD schema (structred data).
Stars: ✭ 113 (+169.05%)
Mutual labels:  open-graph, twitter-cards, json-ld
Embed
Get info from any web service or page
Stars: ✭ 1,808 (+4204.76%)
Mutual labels:  oembed, twitter-cards
svelte-seo
Optimize your website for search engines and social media with meta tags, Open Graph, and JSON-LD.
Stars: ✭ 257 (+511.9%)
Mutual labels:  open-graph, json-ld
Og Image
Open Graph Image as a Service - generate cards for Twitter, Facebook, Slack, etc
Stars: ✭ 2,706 (+6342.86%)
Mutual labels:  open-graph, twitter-cards
flyyer-ruby
Ruby helpers to create https://cdn.flyyer.io URLs | Og:Image as a Service
Stars: ✭ 13 (-69.05%)
Mutual labels:  open-graph, twitter-cards
axiom
Axiom - A Hugo Theme. GitTip: https://gitcoin.co/tip?username=jhauraw
Stars: ✭ 67 (+59.52%)
Mutual labels:  open-graph, structured-data
schema-dot-org
Validated structured data for websites
Stars: ✭ 42 (+0%)
Mutual labels:  json-ld, structured-data
schemify
Automatically generate Schema.org JSON-LD markup for WordPress content.
Stars: ✭ 58 (+38.1%)
Mutual labels:  json-ld, structured-data
titanium-json-ld
A JSON-LD 1.1 Processor & API
Stars: ✭ 79 (+88.1%)
Mutual labels:  json-ld, structured-data
flyyer-python
Python helpers to create https://flyyer.io URLs for link previews | Manage your og:images from a single dashboard
Stars: ✭ 11 (-73.81%)
Mutual labels:  open-graph, twitter-cards
HugoStructuredData
Collection of structured data snippets in Google preferred JSON-LD format, with support for Hugo
Stars: ✭ 33 (-21.43%)
Mutual labels:  json-ld, structured-data
Schemaorg
Schema.org - schemas and supporting software
Stars: ✭ 4,372 (+10309.52%)
Mutual labels:  json-ld, structured-data
flyyer-wp
👉 Visit the wiki: https://github.com/useflyyer/flyyer-wp/wiki | Generate social share images with web technologies
Stars: ✭ 13 (-69.05%)
Mutual labels:  open-graph, twitter-cards
go-oembed
Golang package for parsing Oembed data from known providers by URL
Stars: ✭ 22 (-47.62%)
Mutual labels:  oembed
transformer-oembed
@remark-embedder transformer for oEmbed supported links
Stars: ✭ 25 (-40.48%)
Mutual labels:  oembed
audiocard
⏯️ AudioCard - Opinionated, responsive, audio player compatible with Twitter Cards
Stars: ✭ 66 (+57.14%)
Mutual labels:  twitter-cards
ControlledVocabularyManager
Rails application with Blazegraph for managing controlled vocabularies in RDF.
Stars: ✭ 20 (-52.38%)
Mutual labels:  json-ld
oembed
PHP OEmbed wrapper for well-known video platforms and services
Stars: ✭ 26 (-38.1%)
Mutual labels:  oembed
oembetter
A modern oembed client. Allows you to register filters to improve or supply oembed support for sites that don't normally have it. You can also supply a whitelist of services you trust to prevent XSS attacks.
Stars: ✭ 50 (+19.05%)
Mutual labels:  oembed
schema-and-structured-data-for-wp
Creating the best Structured Data and Schema plugin for WordPress
Stars: ✭ 66 (+57.14%)
Mutual labels:  structured-data

Furlex

Furlex is a structured data extraction tool written in Elixir.

It currently supports unfurling oEmbed, Twitter Card, Facebook Open Graph, JSON-LD and plain ole' HTML <meta /> data out of any url you supply.

Installation

Add :furlex to your list of dependencies in mix.exs:

def deps do
  [{:furlex, "~> 0.5.0"}]
end

Then run $ mix deps.get. Also add :furlex to your applications list:

def application do
  [applications: [:furlex]]
end

Jason is the default json library in Furlex. You can however configure Furlex to use another library. For example:

config :furlex, :json_library, YourLibraryOfChoice

Usage

To unfurl a url, simply pass it to Furlex.unfurl/1

iex(1)> Furlex.unfurl "https://www.youtube.com/watch?v=Gh6H7Md_L2k"
{:ok,
 %Furlex{canonical_url: "https://www.youtube.com/watch?v=Gh6H7Md_L2k",
  facebook: %{"fb:app_id" => "87741124305",
    "og:description" => "Watch the full episode: https://www.thisoldhouse.com/watch/ask-toh-future-house-offerman Ask This Old House host Kevin O’Connor visits Nick Offerman in Los A...",
    "og:image" => "https://i.ytimg.com/vi/Gh6H7Md_L2k/maxresdefault.jpg",
    "og:site_name" => "YouTube",
    "og:title" => "Touring Nick Offerman’s Wood Shop", "og:type" => "video",
    "og:url" => "https://www.youtube.com/watch?v=Gh6H7Md_L2k",
    "og:video:height" => ["720", "720"],
    "og:video:secure_url" => ["https://www.youtube.com/embed/Gh6H7Md_L2k",
     "https://www.youtube.com/v/Gh6H7Md_L2k?version=3&autohide=1"],
    "og:video:type" => ["text/html", "application/x-shockwave-flash"],
    "og:video:url" => ["https://www.youtube.com/embed/Gh6H7Md_L2k",
     "http://www.youtube.com/v/Gh6H7Md_L2k?version=3&autohide=1"],
    "og:video:width" => ["1280", "1280"]},
  json_ld: [%{"@context" => "http://schema.org", "@type" => "BreadcrumbList",
     "itemListElement" => [%{"@type" => "ListItem",
        "item" => %{"@id" => "http://www.youtube.com/user/thisoldhouse",
          "name" => "This Old House"}, "position" => 1}]}],
  oembed: %{"author_name" => "This Old House",
    "author_url" => "https://www.youtube.com/user/thisoldhouse",
    "height" => 270,
    "html" => "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/Gh6H7Md_L2k?feature=oembed\" frameborder=\"0\" gesture=\"media\" allow=\"encrypted-media\" allowfullscreen></iframe>",
    "provider_name" => "YouTube", "provider_url" => "https://www.youtube.com/",
    "thumbnail_height" => 360,
    "thumbnail_url" => "https://i.ytimg.com/vi/Gh6H7Md_L2k/hqdefault.jpg",
    "thumbnail_width" => 480, "title" => "Touring Nick Offerman’s Wood Shop",
    "type" => "video", "version" => "1.0", "width" => 480},
  other: %{"description" => "Watch the full episode: https://www.thisoldhouse.com/watch/ask-toh-future-house-offerman Ask This Old House host Kevin O’Connor visits Nick Offerman in Los A...",
    "keywords" => "this old house, how-to, home improvement, Episode, TV Show, DIY, Ask This Old House, Nick Offerman, Kevin O'Connor, woodworking, wood shop",
    "theme-color" => "#ff0000",
    "title" => "Touring Nick Offerman’s Wood Shop"},
  status_code: 200,
  twitter: %{"twitter:app:id:googleplay" => "com.google.android.youtube",
    "twitter:app:id:ipad" => "544007664",
    "twitter:app:id:iphone" => "544007664",
    "twitter:app:name:googleplay" => "YouTube",
    "twitter:app:name:ipad" => "YouTube",
    "twitter:app:name:iphone" => "YouTube",
    "twitter:app:url:googleplay" => "https://www.youtube.com/watch?v=Gh6H7Md_L2k",
    "twitter:app:url:ipad" => "vnd.youtube://www.youtube.com/watch?v=Gh6H7Md_L2k&feature=applinks",
    "twitter:app:url:iphone" => "vnd.youtube://www.youtube.com/watch?v=Gh6H7Md_L2k&feature=applinks",
    "twitter:card" => "player",
    "twitter:description" => "Watch the full episode: https://www.thisoldhouse.com/watch/ask-toh-future-house-offerman Ask This Old House host Kevin O’Connor visits Nick Offerman in Los A...",
    "twitter:image" => "https://i.ytimg.com/vi/Gh6H7Md_L2k/maxresdefault.jpg",
    "twitter:player" => "https://www.youtube.com/embed/Gh6H7Md_L2k",
    "twitter:player:height" => "720", "twitter:player:width" => "1280",
    "twitter:site" => "@youtube",
    "twitter:title" => "Touring Nick Offerman’s Wood Shop",
    "twitter:url" => "https://www.youtube.com/watch?v=Gh6H7Md_L2k"}}}

Configuration

Furlex accepts a few optional configuration parameters.

You may configure additional tags to capture under the Facebook OpenGraph and TwitterCard parsers.

config :furlex, Furlex.Parser.Facebook,
  tags: ~w(my:custom:facebook:tag another:custom:facebook:tag)

config :furlex, Furlex.Parser.Twitter,
  tags: ~w(my:custom:twitter:tag)

You may also configure the depth of the resulting Furlex map with a :group_keys? boolean.

config :furlex, group_keys?: true

If this option is set to false or unconfigured, Furlex will return values mapped directly beneath OpenGraph and TwitterCard keys, i.e.

%Furlex{twitter: %{
  "twitter:app:id:googleplay" => "com.google.android.youtube",
  "twitter:app:id:ipad"       => "544007664",
  "twitter:app:id:iphone"     => "544007664"
}}

If true, Furlex will return values grouped into colon-delimited map structures, i.e.

%Furlex{twitter: %{
  "twitter" => %{
    "app" => %{
      "id" => %{
        "googleplay" => "com.google.android.youtube",
        "ipad"       => "544007664",
        "iphone"     => "544007664"
      }
    }
  }
}}

License

Copyright 2017 Clayton Gentry

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0`

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].