ruby-oembed-0.18.1/ 0000755 0000041 0000041 00000000000 14740472417 014055 5 ustar www-data www-data ruby-oembed-0.18.1/.gitignore 0000644 0000041 0000041 00000000441 14740472417 016044 0 ustar www-data www-data # Build and local dev artifacts
/pkg
/.bundle
/rails_oembed
Gemfile.lock
/doc
.yardoc
coverage
.rspec-status
# MacOS Things
.DS_Store
# Version management files
# (We want each developer to be able to use the version of their choosing)
/.rvm
/.tool-versions
/.ruby-version
/.ruby-gemset
ruby-oembed-0.18.1/ruby-oembed.gemspec 0000644 0000041 0000041 00000002466 14740472417 017644 0 ustar www-data www-data # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
require 'oembed/version'
Gem::Specification.new do |s|
s.name = "ruby-oembed"
s.version = OEmbed::Version.to_s
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Magnus Holm", "Alex Kessinger", "Aris Bartee", "Marcos Wright Kuhns"]
s.date = Time.now.strftime("%F")
s.description = "An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See http://oembed.com for more information about the protocol."
s.email = "webmaster@wrightkuhns.com"
s.homepage = "https://github.com/ruby-oembed/ruby-oembed"
s.licenses = ["MIT"]
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?('spec/') || f.start_with?('integration_test/') }
s.rdoc_options = ["--main", "README.rdoc", "--title", "ruby-oembed-#{OEmbed::Version}", "--inline-source", "--exclude", "tasks", "CHANGELOG.rdoc"]
s.extra_rdoc_files = s.files.grep(%r{\.rdoc$}) + %w{LICENSE}
s.require_paths = ["lib"]
s.rubygems_version = "1.8.19"
s.summary = "oEmbed for Ruby"
s.add_development_dependency 'xml-simple', '>= 0'
s.add_development_dependency 'nokogiri', '>= 0'
end
ruby-oembed-0.18.1/.github/ 0000755 0000041 0000041 00000000000 14740472417 015415 5 ustar www-data www-data ruby-oembed-0.18.1/.github/workflows/ 0000755 0000041 0000041 00000000000 14740472417 017452 5 ustar www-data www-data ruby-oembed-0.18.1/.github/workflows/ruby.yml 0000644 0000041 0000041 00000002223 14740472417 021155 0 ustar www-data www-data # This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Ruby
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.6', '3.0', '3.2']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
ruby-oembed-0.18.1/Guardfile 0000644 0000041 0000041 00000002014 14740472417 015677 0 ustar www-data www-data guard "bundler" do
watch("Gemfile")
end
group :red_green_refactor, :halt_on_fail => true do
guard "rspec", :cmd => "bundle exec rspec" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^spec/cassettes/.+.yml$}) { "spec" }
watch(%r{^lib/(.+)\.rb$}) do |m|
# Split up the file path into an Array
path_parts = []
remaining_path = m[1]
while File.dirname(remaining_path) != '.'
remaining_path, file = File.split(remaining_path)
path_parts << file
end
path_parts << remaining_path
path_parts.reverse!
# Specs don't contain an oembed subdir
path_parts.shift
# Special case for formatter specs
if path_parts.include?('formatter') && path_parts.include?('backends')
path_parts.delete('backends')
path_parts.last.gsub!(/$/, "_backend")
end
# Add on the _spec.rb postfix
path_parts.last.gsub!(/$/, "_spec.rb")
f = File.join("spec", *path_parts)
puts "#{m.inspect} => #{f.inspect}"
f
end
end
end
ruby-oembed-0.18.1/lib/ 0000755 0000041 0000041 00000000000 14740472417 014623 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed.rb 0000644 0000041 0000041 00000000641 14740472417 016404 0 ustar www-data www-data $:.unshift File.dirname(__FILE__)
require 'net/http'
require 'oembed/version'
require 'oembed/errors'
require 'oembed/formatter'
require 'oembed/provider'
require 'oembed/provider_discovery'
require 'oembed/providers'
require 'oembed/providers/builtin_providers'
require 'oembed/response'
require 'oembed/response/photo'
require 'oembed/response/video'
require 'oembed/response/link'
require 'oembed/response/rich'
ruby-oembed-0.18.1/lib/tasks/ 0000755 0000041 0000041 00000000000 14740472417 015750 5 ustar www-data www-data ruby-oembed-0.18.1/lib/tasks/rspec.rake 0000644 0000041 0000041 00000000132 14740472417 017724 0 ustar www-data www-data require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:specs)
task :default => :specs ruby-oembed-0.18.1/lib/tasks/oembed.rake 0000644 0000041 0000041 00000002631 14740472417 020051 0 ustar www-data www-data begin
require 'yaml'
require 'json'
require 'open-uri'
namespace :oembed do
desc "Update the noembed_urls.yml file using the services api."
task :update_noembed do
# Details at http://api.embed.ly/docs/service
json_uri = URI.parse("https://noembed.com/providers")
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/aggregators/noembed_urls.yml")
services = JSON.parse(json_uri.read)
url_regexps = []
services.each do |service|
url_regexps += service['patterns'].map{|r| r.strip }
end
url_regexps.sort!
YAML.dump(url_regexps, File.open(yaml_path, 'w'))
end
desc "Update the embedly_urls.yml file using the services api."
task :update_embedly do
# Details at http://api.embed.ly/docs/service
json_uri = URI.parse("http://api.embed.ly/1/services")
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/aggregators/embedly_urls.yml")
services = JSON.parse(json_uri.read)
url_regexps = []
services.each do |service|
url_regexps += service['regex'].map{|r| r.strip }
end
url_regexps.sort!
YAML.dump(url_regexps, File.open(yaml_path, 'w'))
end
task :update_oohembed do
raise "Unfortunately the oohembed has discontinued."
end
end
rescue LoadError
puts "The oembed rake tasks require JSON. Install it with: gem install json"
end
ruby-oembed-0.18.1/lib/oembed/ 0000755 0000041 0000041 00000000000 14740472417 016056 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/provider_discovery.rb 0000644 0000041 0000041 00000005345 14740472417 022333 0 ustar www-data www-data require 'oembed/http_helper'
module OEmbed
# Uses {oEmbed Discover}[http://oembed.com/#section4] to generate a new Provider
# instance about a URL for which a Provider didn't previously exist.
class ProviderDiscovery
class << self
include OEmbed::HttpHelper
# Discover the Provider for the given url, then call Provider#raw on that provider.
# The query parameter will be passed to both discover_provider and Provider#raw
# @deprecated *Note*: This method will be made private in the future.
def raw(url, query={})
provider = discover_provider(url, query)
provider.raw(url, query)
end
# Discover the Provider for the given url, then call Provider#get on that provider.
# The query parameter will be passed to both discover_provider and Provider#get
def get(url, query={})
provider = discover_provider(url, query)
provider.get(url, query)
end
# Returns a new Provider instance based on information from oEmbed discovery
# performed on the given url.
#
# The options Hash recognizes the following keys:
# :format:: If given only discover endpoints for the given format. If not format is given, use the first available format found.
# :timeout:: specifies the timeout (in seconds) for the http request.
# :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
def discover_provider(url, options = {})
uri = URI.parse(url)
res = http_get(uri, options)
format = options[:format]
if format.nil? || format == :json
provider_endpoint ||= /]*href=['"]*([^\s'"]+)['"]*[^>]*application\/json\+oembed[^>]*>/.match(res)[1] rescue nil
provider_endpoint ||= /]*application\/json\+oembed[^>]*href=['"]*([^\s'"]+)['"]*[^>]*>/.match(res)[1] rescue nil
format ||= :json if provider_endpoint
end
if format.nil? || format == :xml
# {The specification}[http://oembed.com/#section4] says XML discovery should have
# type="text/xml+oembed" but some providers use type="application/xml+oembed"
provider_endpoint ||= /]*href=['"]*([^\s'"]+)['"]*[^>]*(application|text)\/xml\+oembed[^>]*>/.match(res)[1] rescue nil
provider_endpoint ||= /]*(application|text)\/xml\+oembed[^>]*href=['"]*([^\s'"]+)['"]*[^>]*>/.match(res)[2] rescue nil
format ||= :xml if provider_endpoint
end
begin
provider_endpoint = URI.parse(provider_endpoint)
provider_endpoint.query = nil
provider_endpoint = provider_endpoint.to_s
rescue URI::Error
raise OEmbed::NotFound, url
end
Provider.new(provider_endpoint, format || OEmbed::Formatter.default)
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/providers/ 0000755 0000041 0000041 00000000000 14740472417 020073 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/providers/facebook_post.rb 0000644 0000041 0000041 00000003126 14740472417 023240 0 ustar www-data www-data module OEmbed
class Providers
# Provider for Facebook posts
# See https://developers.facebook.com/docs/plugins/oembed
# See https://developers.facebook.com/docs/graph-api/reference/v8.0/oembed-post
FacebookPost = OEmbed::Provider.new(
"https://graph.facebook.com/v8.0/oembed_post",
required_query_params: { access_token: 'OEMBED_FACEBOOK_TOKEN' },
format: :json
)
FacebookPost << 'https://www.facebook.com/*/posts/*'
FacebookPost << 'https://www.facebook.com/*/activity/*'
FacebookPost << 'https://www.facebook.com/photo*'
FacebookPost << 'https://www.facebook.com/*/photo*'
FacebookPost << 'https://www.facebook.com/media*'
FacebookPost << 'https://www.facebook.com/questions*'
FacebookPost << 'https://www.facebook.com/notes*'
# Note: even though FacebookPost is automatically registered as an official provider
# it will NOT resolve any URLs unless its access_token is set
# either via the OEMBED_FACEBOOK_TOKEN environment variable
# or by calling `OEmbed::Providers::FacebookPost.access_token = @your_token`
add_official_provider(FacebookPost, nil, access_token: {name: :facebook, method: :access_token})
# Respond to the `new` method to maintain backwards compatibility with v0.14.0
# See also:
# * https://github.com/ruby-oembed/ruby-oembed/pull/75
# * https://github.com/ruby-oembed/ruby-oembed/issues/77#issuecomment-727024682
# @deprecated *Note*: This method will be be removed in the future.
def FacebookPost.new(access_token:)
self.access_token = access_token
self
end
end
end
ruby-oembed-0.18.1/lib/oembed/providers/tiktok.rb 0000644 0000041 0000041 00000000471 14740472417 021727 0 ustar www-data www-data module OEmbed
class Providers
# Provider for tiktok.com
# See https://developers.tiktok.com/doc/embed-videos
TikTok = OEmbed::Provider.new(
"https://www.tiktok.com/oembed",
format: :json
)
TikTok << "https://www.tiktok.com/*/video/*"
add_official_provider(TikTok)
end
end
ruby-oembed-0.18.1/lib/oembed/providers/aggregators/ 0000755 0000041 0000041 00000000000 14740472417 022400 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/providers/aggregators/oohembed_urls.yml 0000644 0000041 0000041 00000001076 14740472417 025756 0 ustar www-data www-data ---
- http://*.blip.tv/*
- http://*.clikthrough.com/theater/video/*
- http://*.dailymotion.com/*
- http://*.flickr.com/photos/*
- http://*.kinomap.com/*
- http://*.nfb.ca/film/*
- http://*.photobucket.com/albums/*|http://*.photobucket.com/groups/*
- http://*.revision3.com/*
- http://*.scribd.com/*
- http://*.viddler.com/explore/*
- http://*.youtube.com/watch*
- http://dotsub.com/view/*
- http://qik.com/*
- http://www.hulu.com/watch/*
- http://www.vimeo.com/* and http://www.vimeo.com/groups/*/videos/*
- http://yfrog.(com|ru|com.tr|it|fr|co.il|co.uk|com.pl|pl|eu|us)/*
ruby-oembed-0.18.1/lib/oembed/providers/aggregators/embedly_urls.yml 0000644 0000041 0000041 00000147114 14740472417 025621 0 ustar www-data www-data ---
- http://*.23video.com/*
- http://*.alpacamaps.com/*
- http://*.bandcamp.com/
- http://*.bandcamp.com/album/*
- http://*.bandcamp.com/track/*
- http://*.blip.tv/*/*
- http://*.brainsonic.com/*
- http://*.bubb.li/*
- http://*.buzzsprout.com/*
- http://*.cartodb.com/*/*
- http://*.cdn.vooplayer.com/*
- http://*.cincopa.com/watch/*
- http://*.cloud.panopto.eu/*
- http://*.crowdmap.com/map/*
- http://*.crowdmap.com/post/*
- http://*.dailymotion.com/*/video/*
- http://*.dailymotion.com/video/*
- http://*.deviantart.com
- http://*.deviantart.com/#/*
- http://*.deviantart.com/*/*.gif
- http://*.deviantart.com/*/*.jpg
- http://*.deviantart.com/art/*
- http://*.deviantart.com/gallery
- http://*.deviantart.com/gallery/*
- http://*.deviantart.net/*/*.gif
- http://*.deviantart.net/*/*.jpg
- http://*.embed\.fun/*
- http://*.force.com/presentation*
- http://*.hosted.panopto.com/*
- http://*.iplayerhd.com/player/video/*
- http://*.iplayerhd.com/playerframe/*
- http://*.kaltura.com/*
- http://*.kastio.com/webcasts/*
- http://*.kinomap.com/*
- http://*.libsyn.com/*
- http://*.looplogic.com/*
- http://*.paperform.co/*
- http://*.polarb.com/*
- http://*.razoo.com/*
- http://*.silk.co/explore/*
- http://*.slideshare.net/*/*
- http://*.smugmug.com/*
- http://*.smugmug.com/*#*
- http://*.sparemin.com/myrecording
- http://*.sparemin.com/recording-*
- http://*.staging.panopto.com/*
- http://*.tiktok.com/*
- http://*.tinypic.com/*.jpg
- http://*.tinypic.com/*.png
- http://*.tochka.net/*
- http://*.tumblr.com/post/*
- http://*.twentythree.net/*
- http://*.twitch.tv/*
- http://*.twitrpix.com/*
- http://*.typeform.com/*
- http://*.univision.com/*/video/*
- http://*.uservoice.com/*/suggestions/*
- http://*.vidcaster.com/*
- http://*.videomarketingplatform.co/*
- http://*.walkinto.in/*/*
- http://*.web.tv/*
- http://*.wi.st/*
- http://*.wikipedia.org/wiki/*
- http://*.wistia.com/*
- http://*.yahoo.com/movies/*
- http://*.youtube.com/*#*/*
- http://*.youtube.com/playlist*
- http://*.youtube.com/profile*
- http://*.youtube.com/user/*
- http://*.youtube.com/v/*
- http://*.youtube.com/view_play_list*
- http://*boxofficebuz.com/video/*
- http://*crackle.com/c/*
- http://*dribbble.com/shots/*
- http://*imgur.com/*
- http://*meetup.com/*
- http://*nfb.ca/film/*
- http://*revision3.com/*
- http://*viddler.com/v/*
- http://*vidyard.com/*
- http://*youtube.com/watch*
- http://23degrees.io/*
- http://23hq.com/*/photo/*
- http://23video.com/*
- http://360.io/*
- http://360stories.com/*
- http://3d.cappasity.com/u/*
- http://3dcrafts.co.kr/*
- http://3dcrafts.net/*
- http://4cook.net/recipe/*
- http://4sq.com/*
- http://59saniye.com/*
- http://60db.co/story/*
- http://a.fsbl.io/*
- http://abcnews.com/*/video/*
- http://acebot.ai/*
- http://acehiphop.com/*
- http://achewood.com/*
- http://achewood.com/index.php*
- http://adorilabs.com/*
- http://adpaths.com/*
- http://alkislarlayasiyorum.com/*
- http://allears.cc/*
- http://allihoopa.com/s/*
- http://alpha.vrchive.com/*
- http://alphahat.com/view/*
- http://anchor.fm/*
- http://aniboom.com/animation-video/*
- http://animal.discovery.com/videos/*
- http://animoto.com/play/*
- http://answers.polldaddy.com/poll/*
- http://apester.com/*
- http://api.bangbang.do/*
- http://api.lovelive.tv/v1/*
- http://api.minoto-video.com/publishers/*/videos/*
- http://app.badpanda.gg/*
- http://app.queezly.com/*
- http://app.sliderocket.com/*
- http://app.stghv.com/*
- http://app.ustudio.com/embed/*/*
- http://app.videocheckout.com/embed/*
- http://app.wistia.com/embed/medias/*
- http://app.wizer.me/learn/*
- http://app.wizer.me/preview/*
- http://appfollow.io/*
- http://arcg.is/*
- http://archivos.digital/*
- http://are.na/*
- http://article.voxsnap.com/*
- http://askmen.com/video/*
- http://asofterworld.com/*.jpg
- http://athenascope.com/*
- http://audioboom.com/boos/*
- http://audioboom.com/posts/*
- http://audiomack.com/*
- http://audm.com/*
- http://ausha.co/*
- http://autodesk.com/*
- http://avocode.com/*
- http://backtracks.fm/*
- http://badgr.io/*
- http://bale.io/*
- http://bambuser.com/channel/*
- http://bambuser.com/channel/*/broadcast/*
- http://bambuser.com/v/*
- http://bangbang.do/*
- http://bcove.me/*
- http://bcove.video/*
- http://beautiful.ai/*
- http://behance.net/gallery/*
- http://beta-sliderocket.com/*
- http://beta.mapinmind.net/*
- http://beta.polstir.com/*/*
- http://bingewith.com/*
- http://bitofme.io/*
- http://blab.im/*
- http://blip.tv/*/*
- http://blogcast.host/*
- http://blogsend.io/*
- http://blueprintue.com/*
- http://boo.fm/b*
- http://bootkik.com/*
- http://bop.fm/s/*/*
- http://boston.com/*video*
- http://boston.com/video*
- http://braid.io/embed-tile/*
- http://brainshark.com/*/*
- http://brainsonic.com/*
- http://bravotv.com/*/*/videos/*
- http://bubb.li/*
- http://buk.io/*
- http://bumpers.fm/e/*
- http://buncee.com/*
- http://bunkrapp.com/*/*
- http://buttondown.email/*
- http://buyte.co/embed*
- http://buzzsprout.com/*
- http://cadence13.com/*
- http://calameo.com/*
- http://calconic.com/*
- http://campaign.theheartstringsproject.com/*
- http://canalplus.fr/*
- http://captur3d.io/*
- http://carbon.now.sh/*
- http://cards.heeyy.com/*
- http://cayke.co/*
- http://cbsnews.com/video/watch/*
- http://cdn.knightlab.com/libs/juxtapose/*
- http://cdn.knightlab.com/libs/timeline3/*
- http://cdn.sendout.io/*
- http://charts.socialexplorer.com/*
- http://chatnews.io/embeds/*
- http://checkmedia.org/*/project/*
- http://chew.tv/*/*
- http://chirb.it/*
- http://cincopa.com/~*
- http://cinema8.com/*
- http://cinnamon.video/*
- http://clay.run/*
- http://clippituser.tv/*
- http://clipter.com/c/*
- http://clyp.it/*
- http://cms.megaphone.fm/*
- http://cnb.cx/*
- http://cnbc.com/id/*/play/1/video/*
- http://cnbc.com/id/*?*video*
- http://cnn.it/*
- http://codeembed.dev/*
- http://codegenerators.io/*
- http://codeocean.com/*
- http://codepen.io/*/pen/*
- http://codepen.io/*/pen/*
- http://codepicnic.com/bites/*
- http://codepicnic.com/consoles/*
- http://codeply.com/view/*
- http://codeprism.co/*
- http://codesandbox.io/*
- http://codesandbox.io/*
- http://codiva.io/p/*
- http://cohe.se/*
- http://collect.chat/*
- http://collegehumor.com/video/*
- http://collegehumor.com/video:*
- http://commaful.com/*
- http://confreaks.com/videos/*
- http://confreaks.net/videos/*
- http://content.newsbound.com/*/*
- http://content.streamonecloud.net/embed/*
- http://cooler.tv/*
- http://coub.com/embed/*
- http://coub.com/view/*
- http://crowdmap.com/map/*
- http://crowdmap.com/post/*
- http://cube365.net/*
- http://d.pr/i/*
- http://danfoss.com/*
- http://dashboard.minoto-video.com/main/video/details/*
- http://datapane.com/*
- http://datasmoothie.com/*/*
- http://datastudio.google.com/*
- http://datavis.tech/*
- http://datawrapper.dwcdn.net/*
- http://dcaclab.com/*
- http://decs.xyz/*
- http://diagramy.com/*
- http://distrify.com/film/*
- http://dlystr.io/*
- http://dnbradio.com/*
- http://docdroid.net/*
- http://doculet.net/*
- http://dotsub.com/view/*
- http://drbl.in/*
- http://dreambroker.com/channel/*
- http://dsc.discovery.com/videos/*
- http://dtsgr.com/*
- http://edition.cnn.com/video/*
- http://edition.cnn.com/videos/*
- http://edocr.com/*
- http://elementari.io/*
- http://ellie-app.com/*/*
- http://embed.actionbutton.co/embedly*
- http://embed.eberus.com/*
- http://embed.imajize.com/*
- http://embed.kumu.io
- http://embed.kumu.io
- http://embed.medleytext.net/*
- http://embed.minoto-video.com/*
- http://embed.sigsev.io/*
- http://embed.socialexplorer.com/*
- http://embed.socialexplorer.com/*
- http://embedery.com/*
- http://emojicom.io/*
- http://emojot.com/*
- http://envelope.li/*
- http://epluribus.io/*
- http://esplor.io/*
- http://ethfiddle.com/*
- http://exploratory.io/viz/*
- http://eyrie.io/*
- http://facer.io/*
- http://factsumo.com/*
- http://fav.me/*
- http://fb.com
- http://fb.me/*
- http://firstory.me/*
- http://fiverr.com/*/*
- http://flat.io/score/*
- http://flexvid.io/*
- http://flic.kr/*
- http://flipnot.es/*
- http://flixel.com/*
- http://flourish.studio/*
- http://flowvella.com/s/*
- http://fontself.com/*
- http://footpathapp.com/*
- http://fora.tv/*/*/*/*
- http://forge.gg/*
- http://form.jotform.com/*
- http://formula-embedappspot.com/*
- http://fotopedia.com/*/*
- http://foursquare.com/*
- http://fr.peoplbrain.com/tutoriaux/*
- http://frankly.me/*
- http://freemusicarchive.org/curator/*
- http://freemusicarchive.org/music/*
- http://frontback.me/p/*
- http://funnyordie.com/m/*
- http://funnyordie.com/videos/*
- http://futurism.com/images/*
- http://fwdeveryone.com/t/*
- http://galeri.uludagsozluk.com/*
- http://gametakes.com/*
- http://gametrailers.com/video*
- http://genesisplayer.io/*
- http://genius.com/videos/*
- http://getclippy.co/p/*
- http://getcloudapp.com/*
- http://getfader.com/*
- http://getshuffle.app/*
- http://getsportsme.com/*
- http://gfycat.com/*
- http://gif-vif.com/*
- http://giflike.com/a/*
- http://gifyourgame.com/*
- http://giphy.com/gifs/*
- http://gist.github.com/*
- http://gitpitch.com/*/*
- http://glitch.com/*
- http://go.vooozer.com/*
- http://goabstract.com/*
- http://goanimate.com/videos/*
- http://godtube.com/featured/video/*
- http://godtube.com/watch/*
- http://goodworld.me/*
- http://google.*/maps/*
- http://google.com/profiles/*
- http://goplayalong.com/*
- http://gosynth.com/*
- http://gph.is/*
- http://grain.co/*
- http://graphcommons.com/graphs/*
- http://graphcommons.com/nodes/*
- http://graphiq.com/w/*
- http://greetor.com/*
- http://gridble.io/*
- http://grindtv.com/*/video/*
- http://grooveshark.com/*
- http://guardian.co.uk/*/video/*/*/*/*
- http://guilded.gg/*
- http://hapyak.com/embed/*
- http://hardbound.co/*/*/*
- http://hatchxr.com/*
- http://health.discovery.com/videos/*
- http://herth.co/*
- http://heytwist.com/*
- http://hopbucket.com/plan-details/*
- http://huffduffer.com/*/*
- http://hulu.com/w/*
- http://hulu.com/watch*
- http://hulu.tv/*
- http://hypem.com/premiere/*
- http://i.giflike.com/*
- http://ifood.tv/channel/user/*
- http://ifood.tv/recipe/*
- http://ifood.tv/video/*
- http://iframe.minoto-video.com/*
- http://ifttt.com/recipes/*
- http://ign.com/videos/*
- http://iheart.com/*
- http://img.ly/*
- http://imgs.xkcd.com/*
- http://indshine.com/*
- http://infogr.am/*
- http://infogram.com/*
- http://infomous.com/node/*
- http://injurymap.com/*
- http://instagr.am/p/*
- http://instagram.com/p/*
- http://instaread.co/*
- http://intellogo.com/*
- http://investigation.discovery.com/videos/*
- http://isnare.com/*
- http://issuu.com/*/docs/*
- http://it.youtube.com/*
- http://itemsy.com/*
- http://itslit.com/*
- http://izlesene.com/video/*
- http://jdsupra.com/legalnews/*
- http://jibjab.com/view/*
- http://jovian.ml/*
- http://jsbin.com/*
- http://jsbin.com/*/*
- http://jscomplete.com/*
- http://jsfiddle.net/*
- http://jsitor.com/*
- http://kastio.com/webcasts/*
- http://khanacademy.org/*
- http://kidoju.com/*
- http://kit.com/*
- http://kralify.com/watch*
- http://kyso.io/*
- http://launch.newsinc.com/*
- http://lcontacts.herokuapp.com/embed/button/*
- http://lean-data-science.com/*
- http://like.co/*
- http://link.brightcove.com/services/player/bcpid*
- http://list.ly/list/*
- http://listennotes.com/*
- http://listle.io/*
- http://live.huffingtonpost.com/r/segment/*/*
- http://liveleak.com/view?*
- http://livestream.com/*
- http://logotv.com/video/*
- http://lonelyplanet.com/Clip.aspx?*
- http://ludus.one/*
- http://lustich.de/videos/*
- http://lynda.com/*
- http://m.youtube.com/index*
- http://m.youtube.com/watch*
- http://magisto.com/*
- http://makecode.com/*
- http://makecode.com/*
- http://maphubs.com/user/*/map/*
- http://maps.google.com/?*
- http://maps.google.com/maps/ms?*
- http://maps.google.com/maps?*
- http://meadd.com/*
- http://meadd.com/*/*
- http://medal.tv/*
- http://media.giphy.com/media/*
- http://mediamatters.org/mmtv/*
- http://medibang.com/sv/*
- http://meedle.io/*
- http://meetu.ps/*
- http://megaphone.fm/*
- http://megavisor.com/en/view/*
- http://megavisor.com/view/*
- http://military.discovery.com/videos/*
- http://millioneyez.com/*
- http://minilogs.com/*
- http://minko.io/s/
- http://mixergy.com/*
- http://mlkshk.com/p/*
- http://moby.to/*
- http://momento360.com/e/u/*
- http://momento360.com/e/uc/*
- http://money.cnn.com/video/*
- http://money.cnn.com/videos/*
- http://moveshelf.com/*
- http://mpembed.com/*
- http://mpora.com/videos/*
- http://msn.foxsports.com/video*
- http://msnbc.msn.com/*/watch/*
- http://multimedia.foxsports.com/m/video/*/*
- http://muralapp.io/*
- http://muvi.es/*
- http://muzu.tv/*
- http://my.opera.com/*/albums/show.dml?id=*
- http://my.opera.com/*/albums/showpic.dml?album=*&picture=*
- http://my.panomoments.com/*
- http://my.storygami.com/video/*
- http://my.webboards.fr/*
- http://mybeweeg.com/w/*
- http://mymixtapez.com/*
- http://mynet.com/video/*
- http://myvideoplace.tv/*
- http://namchey.com/*
- http://naturalatlas.com/*
- http://nbcnews.com/*
- http://neatclip.com/*
- http://nodalview.com/*
- http://npmcharts.com/*
- http://nr8.com/embed/*
- http://nuggetcharts.com/*
- http://nzonscreen.com/title/*
- http://oddshot.tv/*
- http://odiocast.com/*
- http://oice.com/*
- http://okluffa.com/*
- http://omniscope.me/*
- http://omny.fm/*
- http://on.aol.com/playlist/*
- http://on.aol.com/video/*
- http://on.bubb.li/*
- http://open.spotify.com/*
- http://openings.moe/*
- http://openprocessing.org/*
- http://orbitvu.com/001/*
- http://oumy.com/v/*
- http://overflow.io/*
- http://ow.ly/i/*
- http://parkfy.com/*
- http://pasteapp.com/*
- http://pastebin.com/*
- http://pastie.org/*
- http://patching.io/*
- http://photozou.jp/photo/photo_only/*/*
- http://photozou.jp/photo/show/*/*
- http://pikchur.com/*
- http://pinecast.co/*
- http://pippa.io/*
- http://pixdor.com/*
- http://pixorial.com/watch/*
- http://planetgreen.discovery.com/videos/*
- http://play.buto.tv/*
- http://play.kotlinlang.org/embed#*http://pl.kotl.in/*
- http://play.minoto-video.com/*
- http://play.radiopublic.com/*
- http://play.soundsgood.co/*
- http://play.spotify.com/*
- http://player.entrypoint.live/*
- http://player.megaphone.fm/*
- http://player.videopath.com/*
- http://player.vimeo.com/*
- http://players.brightcove.net/*
- http://playpost.app/*
- http://plays.tv/*/*
- http://plnkr.co/*
- http://plnkr.co/*
- http://plotly.com/*
- http://plus.google.com/*
- http://polarb.com/*
- http://polarishare.com/*
- http://polaroidswing.com/p/*
- http://polldaddy.com/community/poll/*
- http://polldaddy.com/poll/*
- http://pollforall.com/*
- http://pollsify.com/*
- http://pollstar.com/*
- http://polstir.com/*/*
- http://ponga.com/*
- http://popchest.com/*/
- http://portal.paratii.video/*
- http://portal.sliderocket.com/*
- http://posixion.com/*
- http://pressekompass.net/*
- http://prezi.com/*/*
- http://procfu.com/*
- http://producthunt.com/*
- http://public.chartblocks.com/c/*
- http://public.talely.com/*/*
- http://publicinput.com/*
- http://publish.viostream.com/play/*
- http://publit.io/*
- http://publons.com/author/*
- http://pulse.qa/*
- http://qanda.co/q/*
- http://qik.com/*
- http://qik.com/video/*
- http://qik.ly/*
- http://quantum-circuit.com/*
- http://questionablecontent.net/
- http://questionablecontent.net/comics/*.png
- http://questionablecontent.net/view.php*
- http://qumucloud.com/*
- http://quora.com/*/answer/*
- http://radd.it/comments/*
- http://radd.it/magic/*
- http://radd.it/playlists/*
- http://radd.it/r/*
- http://radd.it/user/*
- http://radiopublic.com/*
- http://radioreddit.com/?q=songs*
- http://radioreddit.com/songs*
- http://rapidengage.com/s/*
- http://rave.dj/*
- http://reading.fm/*
- http://redivis.com/r/*
- http://redux.com/f/*/*
- http://redux.com/stream/item/*/*
- http://registry.bitmark.com/*
- http://rekt.gg/*
- http://relayto.com/*
- http://relive.cc/view/*
- http://repl.it/*
- http://repl.it/*
- http://replay.infinity.fm/*
- http://represent.com/*
- http://reuters.com/video/*
- http://rocketium.com/*
- http://rogertalk.com/*
- http://roshiclips.com/watch*
- http://rumble.com/*
- http://runelm.io/*/*
- http://runkit.com/*
- http://say.ly/*
- http://scalafiddle.io/*
- http://scapic.com/*
- http://science.discovery.com/videos/*
- http://sciencestage.com/a/*.html
- http://sciencestage.com/v/*.html
- http://scorebat.com/*
- http://screencast.com/*/media/*
- http://screencast.com/t/*
- http://screenhunters.com/*
- http://screenr.com/*
- http://scribblemaps.com/maps/view/*/*
- http://scribd.com/doc/*
- http://scribd.com/mobile/documents/*
- http://scrimba.com/*
- http://searchie.io/*
- http://secure.plays.tv/*/*
- http://seekbeak.com/v/*
- http://sendables.jibjab.com/originals/*
- http://sendables.jibjab.com/view/*
- http://sendvid.com/*
- http://serenader.io/*
- http://services.momindum.com/embedly/*
- http://sheetsu.com/tables/*
- http://shoplocket.com/products/*
- http://shorti.com/*
- http://showme.com/sh/*
- http://sidewire.com/*/*/*
- http://simmer.io/*/*
- http://skip.st/one/*
- http://sliderocket.com/*
- http://slidesha.re/*
- http://slidetosubscribe.com/*
- http://slidr.io/*/*
- http://snack.expo.io/*
- http://snappd\.tv/*
- http://snd.sc/*
- http://snipaclip.com/*
- http://snipit.io/*
- http://snotr.com/video/*
- http://socialcam.com/v/*
- http://socialexplorer.com/*
- http://some.ly/*
- http://someecards.com/*/*
- http://song.link/*
- http://soundcloud.com/*
- http://soundcloud.com/*/*
- http://soundcloud.com/*/sets/*
- http://soundcloud.com/groups/*
- http://spaces.archilogic.com/model/*
- http://speakerdeck.com/*/*
- http://speakytext.com/*
- http://sphereplay.com/*
- http://spiegel.de/video/*
- http://spkt.io/*
- http://spoti.fi/*
- http://spott.tv/*
- http://spreaker.com/*
- http://spreecast.com/events/*
- http://sproutvideo.com/videos/*
- http://stackblitz.com/*
- http://stackshare.io/*
- http://stagevids.com/watch*
- http://stanza.co/*
- http://stepic.org/*
- http://stonly.com/*
- http://store.pixdor.com/*
- http://storeo.io/*
- http://stories.nws.ai/*
- http://storribook.com/articles/view/*/*
- http://storyforj.com/*
- http://storygami.com/v/*
- http://storymaps.arcgis.com/stories/*
- http://streamable.com/*
- http://streamio.com/api/v1/*
- http://streamr.network/*
- http://streetfire.net/video/*.htm*
- http://sudomemo.net/*
- http://superstack.io/v/*
- http://supgif.com/*
- http://svrf.com/*
- http://swiftsnip.com/*
- http://swymrelay.com/*
- http://tagmotion.com/tree/*
- http://talkshow.im/show/*
- http://tambur.co/*
- http://tapewrite.com/*
- http://tech.io/snippet/*
- http://tenor.co/*
- http://tenor.com/*
- http://terminaid.com/*
- http://texblocks.com/*
- http://thecolbertreport.cc.com/videos/*
- http://thedailyshow.cc.com/videos/*
- http://theguardian.com/*/video/*/*/*/*
- http://thelastgraph.com/lg.php?a=*
- http://theonion.com/video/*
- http://thesportsme.com/*
- http://thinglink.com/*
- http://threesixty.tours/*
- http://ticker.tv/v/*
- http://tiktok.com/*
- http://tinypic.com/player.php*
- http://tinypic.com/r/*/*
- http://tinypic.com/view.php*
- http://tlc.discovery.com/videos/*
- http://tochka.net/*
- http://today.msnbc.msn.com/id/*/ns/*
- http://today.msnbc.msn.com/id/*/vp/*
- http://tr.instela.com/*
- http://tudou.com/programs/view/*
- http://tumblr.com/*
- http://tun.in/*
- http://tunein.com/*
- http://twitch.tv/*
- http://twitrpix.com/*
- http://typecast.ai/*
- http://uilicious.com/*
- http://uploads.knightlab.com/storymapjs/*/index.html
- http://upscri.be/*
- http://usehappen.com/*
- http://useloom.com/share/*
- http://ustre.am/*
- http://v.embedly.com/*
- http://v.youku.com/v_playlist/*
- http://v.youku.com/v_show/*
- http://vectary.com/*
- http://vectorlogo.zone/*
- http://veoh.com/watch/*
- http://verasity.io/player*
- http://verse.com/stories/*
- http://vibi.com/videocard/*
- http://vice.com/*
- http://vid.me/*
- http://video.allthingsd.com/video/*
- http://video.esri.com/*
- http://video.forbes.com/fvn/*
- http://video.foxbusiness.com/v/*
- http://video.foxnews.com/v/*
- http://video.google.com/videoplay?*
- http://video.pbs.org/video/*
- http://video.uludagsozluk.com/*
- http://video214.com/play/*
- http://videobio.com/playerjs/*
- http://videodetective.com/*/*
- http://videodonor.com/video/*
- http://videos.nymag.com/*
- http://vidgrid.com/*
- http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid*
- http://view.genial.ly/*
- http://view.stacker.cc/*
- http://viewer.archilogic.com/*
- http://vilynx.com/video/*
- http://vimeo.com/*
- http://vimeo.com/groups/*/videos/*
- http://vimeo.com/m/#/*
- http://vimsical.com/vims/*
- http://vine.co/v/*
- http://vizamp.com/player/*
- http://vizor.io/*/*
- http://vizydrop.com/*
- http://vlipsy.com/*
- http://vlurb.co/*
- http://voicepods.com/*
- http://vol.at/video/*
- http://vr3d.vn/*
- http://vrbfoto.com/f/*
- http://vrchive.com/*
- http://vube.com/*/*
- http://vysda.com/*
- http://w.graphiq.com/w/*
- http://walkinto.in/*/*
- http://weavly.com/watch/*
- http://web.tv/*
- http://webassembly.studio/*
- http://websitevoice.com/*
- http://wedgi.es/*
- http://wedonthavetime.org/*
- http://weekendsuperheroes.com/*
- http://whooshkaa.com/*
- http://wi.st/*
- http://widgetic.com/*
- http://widgets.feedbeaver.com/*
- http://wirewax.com/*
- http://wistia.com/*
- http://with.in/watch/*
- http://withkoji.com/*
- http://wonderbooth.com.my/*
- http://wordpress.tv/*/*/*/*/
- http://worldstarhiphop.com/videos/video*.php?v=*
- http://worthyt.io/*
- http://wribbn.com/*
- http://writeinstone.com/*
- http://www.23hq.com/*/photo/*
- http://www.59saniye.com/*
- http://www.achewood.com/*
- http://www.achewood.com/index.php*
- http://www.alkislarlayasiyorum.com/*
- http://www.allego.com/*
- http://www.alphahat.com/view/*
- http://www.altizure.com/project/*
- http://www.aniboom.com/animation-video/*
- http://www.askmen.com/video/*
- http://www.asofterworld.com/*.jpg
- http://www.asofterworld.com/index.php?id=*
- http://www.audioboom.com/boos/*
- http://www.behance.net/gallery/*
- http://www.boston.com/*video*
- http://www.boston.com/video*
- http://www.braid.io/embed-tile/*
- http://www.brainshark.com/*/*
- http://www.branchtrack.com/projects/*
- http://www.bravotv.com/*/*/videos/*
- http://www.calameo.com/*
- http://www.canalplus.fr/*
- http://www.candybank.com/*
- http://www.changelog.com/*
- http://www.clikthrough.com/theater/video/*
- http://www.clipfish.de/*/*/video/*
- http://www.clippituser.tv/*
- http://www.clipsyndicate.com/video/playlist/*/*
- http://www.cnbc.com/id/*/play/1/video/*
- http://www.cnbc.com/id/*?*video*
- http://www.cnn.com/video/*
- http://www.cnn.com/videos/*
- http://www.cnn.com/videos/*
- http://www.codeply.com/view/*
- http://www.codiva.io/p/*
- http://www.colbertnation.com/full-episodes/*
- http://www.colbertnation.com/the-colbert-report-collections/*
- http://www.colbertnation.com/the-colbert-report-videos/*
- http://www.collegehumor.com/video/*
- http://www.collegehumor.com/video:*
- http://www.confreaks.com/videos/*
- http://www.confreaks.net/videos/*
- http://www.dailymile.com/people/*/entries/*
- http://www.datasmoothie.com/*/*
- http://www.dnbradio.com/*
- http://www.dreambroker.com/channel/*
- http://www.eyeem.com/a/*
- http://www.eyeem.com/p/*
- http://www.eyeem.com/u/*
- http://www.facebook.com/*/photos/*
- http://www.facebook.com/*/posts/*
- http://www.facebook.com/*/videos/*
- http://www.facebook.com/photo.php*
- http://www.facebook.com/video.php*
- http://www.figma.com/file/*
- http://www.figma.com/proto/*
- http://www.fiverr.com/*/*
- http://www.flickr.com/photos/*
- http://www.fotopedia.com/*/*
- http://www.foursquare.com/*
- http://www.freemusicarchive.org/curator/*
- http://www.freemusicarchive.org/music/*
- http://www.frontback.me/p/*
- http://www.funnyordie.com/m/*
- http://www.funnyordie.com/videos/*
- http://www.fwdeveryone.com/t/*
- http://www.gametrailers.com/video*
- http://www.getsportsme.com/*
- http://www.giflike.com/a/*
- http://www.globalgiving.org/funds/*
- http://www.globalgiving.org/microprojects/*
- http://www.globalgiving.org/projects/*
- http://www.globalpost.com/dispatch/*
- http://www.globalpost.com/video/*
- http://www.godtube.com/featured/video/*
- http://www.godtube.com/watch/*
- http://www.gogoyoko.com/song/*
- http://www.google.*/maps/*
- http://www.google.com/profiles/*
- http://www.gradba.se/v/*
- http://www.graphiq.com/w/*
- http://www.grindtv.com/*/video/*
- http://www.guardian.co.uk/*/video/*/*/*/*
- http://www.hapyak.com/embed/*
- http://www.hark.com/clips/*
- http://www.howcast.com/videos/*
- http://www.hulu.com/embed/*
- http://www.hulu.com/w/*
- http://www.hulu.com/watch*
- http://www.hurriyettv.com/*
- http://www.hurriyettv.com/*
- http://www.ifood.tv/channel/user/*
- http://www.ifood.tv/recipe/*
- http://www.ifood.tv/video/*
- http://www.ign.com/videos/*
- http://www.initialview.com/player/linkedin*
- http://www.initialview.com/player/linkedin/*
- http://www.instagram.com/p/*
- http://www.isnare.com/*
- http://www.izlesene.com/video/
- http://www.jdsupra.com/legalnews/*
- http://www.khanacademy.org/*
- http://www.kickstarter.com/projects/*/*
- http://www.kiva.org/lend/*
- http://www.koldcast.tv/#video:*
- http://www.koldcast.tv/video/*
- http://www.last.fm/music/*
- http://www.last.fm/music/*/*
- http://www.last.fm/music/*/_/*
- http://www.last.fm/music/+images/*
- http://www.last.fm/music/+videos/*
- http://www.liveleak.com/view?*
- http://www.logotv.com/video/*
- http://www.lonelyplanet.com/Clip.aspx?*
- http://www.lynda.com/*
- http://www.magisto.com/*
- http://www.maphubs.com/user/*/map/*
- http://www.maprosoft.com/app/map*
- http://www.maven.video/*
- http://www.medibang.com/sv/*
- http://www.megafono.io/*
- http://www.metacafe.com/w/*
- http://www.metacafe.com/watch/*
- http://www.metacdn.com/r/c/*/*
- http://www.metacdn.com/r/m/*/*
- http://www.minilogs.com/*
- http://www.mixcloud.com/*/*/
- http://www.mobypicture.com/user/*/view/*
- http://www.moviemogul.io/*
- http://www.mpora.com/videos/*
- http://www.msnbc.msn.com/*/watch/*
- http://www.msnbc.msn.com/id/*/ns/*
- http://www.msnbc.msn.com/id/*/vp/*
- http://www.muzu.tv/*
- http://www.mynet.com/video/
- http://www.myspace.com/index.cfm?fuseaction=*&videoid*
- http://www.myvideo.de/watch/*
- http://www.nbcnews.com/*
- http://www.newhive.com/*/*
- http://www.npr.org/*/*/*/*/*
- http://www.npr.org/*/*/*/*/*/*
- http://www.npr.org/*/*/*/*/*/*/*
- http://www.npr.org/templates/story/story.php*
- http://www.nzonscreen.com/title/*
- http://www.oddshot.tv/*
- http://www.oumy.com/v/*
- http://www.overstream.net/view.php?oid=*
- http://www.pastery.net/*
- http://www.pastie.org/*
- http://www.pixorial.com/watch/*
- http://www.polleverywhere.com/free_text_polls/*
- http://www.polleverywhere.com/multiple_choice_polls/*
- http://www.polleverywhere.com/polls/*
- http://www.popchest.com/*/
- http://www.publons.com/author/*
- http://www.questionablecontent.net/
- http://www.questionablecontent.net/comics/*.png
- http://www.questionablecontent.net/view.php*
- http://www.quora.com/*/answer/*
- http://www.qwantz.com/index.php?comic=*
- http://www.qzzr.com/quiz/*
- http://www.radiopublic.com/*
- http://www.radioreddit.com/?q=songs*
- http://www.radioreddit.com/songs*
- http://www.rdio.com/#/artist/*/album/*
- http://www.rdio.com/artist/*/album/*
- http://www.redivis.com/r/*
- http://www.redux.com/f/*/*
- http://www.redux.com/stream/item/*/*
- http://www.rekt.gg/*
- http://www.relayto.com/*
- http://www.relive.cc/view/*
- http://www.reuters.com/video/*
- http://www.rogertalk.com/*
- http://www.rts.ch/play/tv/*
- http://www.saynow.com/playMsg.html*
- http://www.saynow.com/playMsg.html*
- http://www.schooltube.com/video/*/*
- http://www.sciencestage.com/a/*.html
- http://www.sciencestage.com/v/*.html
- http://www.scrapblog.com/viewer/viewer.aspx*
- http://www.screencast.com/*/media/*
- http://www.screencast.com/t/*
- http://www.scribblemaps.com/maps/view/*/*
- http://www.scribd.com/doc/*
- http://www.scribd.com/mobile/documents/*
- http://www.shorti.com/*
- http://www.showme.com/sh/*
- http://www.simplecast.com/s/*
- http://www.sliderocket.com/*
- http://www.slideshare.net/*/*
- http://www.slideshare.net/mobile/*/*
- http://www.snotr.com/video/*
- http://www.socialcam.com/v/*
- http://www.sociale.co/question/*
- http://www.socialexplorer.com/*
- http://www.some.ly/*
- http://www.someecards.com/*/*
- http://www.spiegel.de/video/*
- http://www.spike.com/video/*
- http://www.spreecast.com/events/*
- http://www.srf.ch/play/*/*/*/*?id=*
- http://www.stackshare.io/*
- http://www.streamio.com/api/v1/*
- http://www.streetfire.net/video/*.htm*
- http://www.sudomemo.net/*
- http://www.tagmotion.com/tree/*
- http://www.talkshow.im/show/*
- http://www.ted.com/index.php/talks/*.html*
- http://www.ted.com/index.php/talks/lang/*/*.html*
- http://www.ted.com/talks/*
- http://www.ted.com/talks/*.html*
- http://www.ted.com/talks/lang/*/*.html*
- http://www.thedailyshow.com/collection/*/*/*
- http://www.thedailyshow.com/full-episodes/*
- http://www.thedailyshow.com/watch/*
- http://www.theguardian.com/*/video/*/*/*/*
- http://www.thelastgraph.com/lg.php?a=*
- http://www.theonion.com/video/*
- http://www.timetoast.com/timelines/*
- http://www.tinypic.com/player.php*
- http://www.tinypic.com/r/*/*
- http://www.tinypic.com/view.php*
- http://www.touchcast.com/*/*
- http://www.traileraddict.com/clip/*
- http://www.traileraddict.com/poster/*
- http://www.traileraddict.com/trailer/*
- http://www.trailerspy.com/trailer/*
- http://www.trailerspy.com/trailer/*/*
- http://www.trailerspy.com/view_video.php*
- http://www.trutv.com/video/*
- http://www.tudou.com/programs/view/*
- http://www.ustream.tv/*
- http://www.ustream.tv/channel/*
- http://www.ustream.tv/recorded/*
- http://www.veoh.com/watch/*
- http://www.vevo.com/video/*
- http://www.vevo.com/watch/*
- http://www.vice.com/*
- http://www.viddy.com/*/v/*
- http://www.viddy.com/video/*
- http://www.videodetective.com/*/*
- http://www.vimeo.com/*
- http://www.vimeo.com/groups/*/videos/*
- http://www.vine.co/v/*
- http://www.vizamp.com/player/*
- http://www.vol.at/video/*
- http://www.vtility.net/virtualtour/*
- http://www.vube.com/*/*
- http://www.weavly.com/watch/*
- http://www.whosay.com/*/content/*
- http://www.whosay.com/*/photos/*
- http://www.whosay.com/*/videos/*
- http://www.wikimedia.org/wiki/File*
- http://www.wikipedia.org/wiki/*
- http://www.wirewax.com/*
- http://www.worldstarhiphop.com/videos/video*.php?v=*
- http://www.xiami.com/song/*
- http://www.xkcd.com/*
- http://www.xtranormal.com/watch/*
- http://www.yelp.com/*&hrid=.+
- http://www.youtube.com/attribution_link*
- http://www.youtube.com/embed/*
- http://www.youtube.com/gif*
- http://www.zapiks.com/*
- http://www.zapkolik.com/video/*
- http://www.zeit.de/video/*
- http://www.zero-inch.com/*
- http://www.zie.nl/video/*
- http://xiami.com/song/*
- http://xkcd.com/*
- http://xtracomedy.com/*
- http://yahoo.com/movies/*
- http://youtu.be/*
- http://youtube.ca/*
- http://youtube.co.uk/*
- http://youtube.com.br/*
- http://youtube.com/attribution_link*
- http://youtube.com/gif*
- http://youtube.es/*
- http://youtube.fr/*
- http://youtube.ie/*
- http://youtube.jp/*
- http://youtube.nl/*
- http://youtube.pl/*
- http://zeit.de/video/*
- http://zie.nl/video/*
- http://ziggeo.io/*
- http://zoomable.ca/*
- https://*.23video.com/*
- https://*.accredible.com/*
- https://*.alpacamaps.com/*
- https://*.bandcamp.com/
- https://*.bandcamp.com/album/*
- https://*.bandcamp.com/track/*
- https://*.brainsonic.com/*
- https://*.buzzsprout.com/*
- https://*.cartodb.com/*/*
- https://*.cdn.vooplayer.com/*
- https://*.cincopa.com/watch/*
- https://*.cloud.panopto.eu/*
- https://*.embed\.fun/*
- https://*.force.com/presentation*
- https://*.hosted.panopto.com/*
- https://*.iplayerhd.com/player/video/*
- https://*.iplayerhd.com/playerframe/*
- https://*.kaltura.com/*
- https://*.libsyn.com/*
- https://*.looplogic.com/*
- https://*.paperform.co/*
- https://*.razoo.com/*
- https://*.silk.co/explore/*
- https://*.slideshare.net/*/*
- https://*.sparemin.com/myrecording
- https://*.sparemin.com/recording-*
- https://*.staging.panopto.com/*
- https://*.stream.co.jp/apiservice/*
- https://*.stream.ne.jp/apiservice/*
- https://*.tiktok.com/*
- https://*.tumblr.com/post/*
- https://*.twentythree.net/*
- https://*.twitch.tv/*
- https://*.typeform.com/*
- https://*.uplabs.com/posts/*
- https://*.videomarketingplatform.co/*
- https://*.vids.io/videos/*
- https://*.walkinto.in/*/*
- https://*.wi.st/*
- https://*.wikipedia.org/wiki/*
- https://*.wistia.com/*
- https://*.yahoo.com/movies/*
- https://*.youtube.com/playlist*
- https://*.youtube.com/v/*
- https://*imgur.com/*
- https://*meetup.com/*
- https://*vidyard.com/*
- https://*youtube.com/watch*
- https://23degrees.io/*
- https://23video.com/*
- https://360stories.com/*
- https://3d.cappasity.com/u/*
- https://3dcrafts.co.kr/*
- https://3dcrafts.net/*
- https://60db.co/story/*
- https://a.fsbl.io/*
- https://abcnews.com/*/video/*
- https://abcnews.com/video/playerIndex*
- https://abcnews.com/video/playerIndex*
- https://abcnews.go.com/*/video/*
- https://abcnews.go.com/*/video/*
- https://abcnews.go.com/video/playerIndex*
- https://abcnews.go.com/video/playerIndex*
- https://accredible.com/*
- https://acebot.ai/*
- https://acehiphop.com/*
- https://adorilabs.com/*
- https://adpaths.com/*
- https://airtable.com/shr*
- https://allears.cc/*
- https://allihoopa.com/s/*
- https://alpha.vrchive.com/*
- https://alugha.com/videos/*
- https://anchor.fm/*
- https://animoto.com/play/*
- https://apester.com/*
- https://api.bangbang.do/*
- https://api.lovelive.tv/v1/*
- https://api.peptone.io/v1/visualize/*
- https://app.badpanda.gg/*
- https://app.devhv.com/oembed/*
- https://app.ilosvideos.com/view/*
- https://app.queezly.com/*
- https://app.stghv.com/*
- https://app.swurveys.com/api/swurveys/*/opengraph
- https://app.very.gd/p/*
- https://app.videocheckout.com/embed/*
- https://app.wistia.com/embed/medias/*
- https://app.wizer.me/learn/*
- https://app.wizer.me/preview/*
- https://appfollow.io/*
- https://archivos.digital/*
- https://are.na/*
- https://art19.com/shows/*/episodes/*
- https://article.voxsnap.com/*
- https://askwhale.com/q/*
- https://athenascope.com/*
- https://audioboom.com/posts/*
- https://audiomack.com/*
- https://audm.com/*
- https://ausha.co/*
- https://autodesk.com/*
- https://avocode.com/*
- https://backtracks.fm/*
- https://badgr.io/*
- https://bangbang.do/*
- https://bcove.video/*
- https://beautiful.ai/*
- https://beta.mapinmind.net/*
- https://bingewith.com/*
- https://bitofme.io/*
- https://blab.im/*
- https://blogcast.host/*
- https://blogsend.io/*
- https://blueprintue.com/*
- https://bootkik.com/*
- https://bop.fm/a/*
- https://bop.fm/p/*
- https://bop.fm/s/*/*
- https://boston.com/*video*
- https://boston.com/video*
- https://braid.io/embed-tile/*
- https://brainshark.com/*/*
- https://brainsonic.com/*
- https://buk.io/*
- https://bumpers.fm/e/*
- https://buncee.com/*
- https://bunkrapp.com/*/*
- https://buttondown.email/*
- https://buyte.co/embed*
- https://buzzsprout.com/*
- https://cadence13.com/*
- https://calameo.com/*
- https://calconic.com/*
- https://campaign.theheartstringsproject.com/*
- https://captur3d.io/*
- https://carbon.now.sh/*
- https://cards.heeyy.com/*
- https://cayke.co/*
- https://cbsnews.com/video/watch/*
- https://cdn.knightlab.com/libs/juxtapose/*
- https://cdn.knightlab.com/libs/timeline3/*
- https://cdn.sendout.io/*
- https://charts.socialexplorer.com/*
- https://chatnews.io/embeds/*
- https://checkmedia.org/*/project/*
- https://chew.tv/*/*
- https://chirb.it/*
- https://cincopa.com/~*
- https://cinema8.com/*
- https://cinnamon.video/*
- https://cl.ly.com/*
- https://clay.run/*
- https://clippituser.tv/*
- https://clipter.com/c/*
- https://cloudup.com/*
- https://clyp.it/*
- https://cms.megaphone.fm/*
- https://cnb.cx/*
- https://cnbc.com/id/*/play/1/video/*
- https://cnbc.com/id/*?*video*
- https://cnn.it/*
- https://codeembed.dev/*
- https://codegenerators.io/*
- https://codeocean.com/*
- https://codepicnic.com/bites/*
- https://codepicnic.com/consoles/*
- https://codeprism.co/*
- https://codiva.io/p/*
- https://cohe.se/*
- https://collect.chat/*
- https://commaful.com/*
- https://content.newsbound.com/*/*
- https://content.streamonecloud.net/embed/*
- https://cooler.tv/*
- https://coub.com/embed/*
- https://coub.com/view/*
- https://cube365.net/*
- https://danfoss.com/*
- https://datapane.com/*
- https://datasmoothie.com/*/*
- https://datastudio.google.com/*
- https://datavis.tech/*
- https://datawrapper.dwcdn.net/*
- https://dcaclab.com/*
- https://decs.xyz/*
- https://diagramy.com/*
- https://dlystr.io/*
- https://dnbradio.com/*
- https://docdroid.net/*
- https://doculet.net/*
- https://dreambroker.com/channel/*
- https://dtsgr.com/*
- https://edition.cnn.com/video/*
- https://edition.cnn.com/videos/*
- https://edocr.com/*
- https://elementari.io/*
- https://ellie-app.com/*/*
- https://embed.actionbutton.co/embedly*
- https://embed.eberus.com/*
- https://embed.medleytext.net/*
- https://embed.sigsev.io/*
- https://embed.simplecast.com/*
- https://embed.socialexplorer.com/*
- https://embed.socialexplorer.com/*
- https://embedery.com/*
- https://emojicom.io/*
- https://emojot.com/*
- https://envelope.li/*
- https://epluribus.io/*
- https://esplor.io/*
- https://ethfiddle.com/*
- https://exif.co/*/i/*
- https://exploratory.io/viz/*
- https://eyrie.io/*
- https://facer.io/*
- https://factsumo.com/*
- https://fb.me/*
- https://firstory.me/*
- https://flexvid.io/*
- https://flic.kr/*
- https://flipnot.es/*
- https://flixel.com/*
- https://flourish.studio/*
- https://flowvella.com/s/*
- https://fontself.com/*
- https://footpathapp.com/*
- https://forge.gg/*
- https://form.jotform.com/*
- https://formula-embed.appspot.com/*
- https://foursquare.com/*
- https://fr.peoplbrain.com/tutoriaux/*
- https://fraim.com/player/*
- https://frontback.me/p/*
- https://futurism.com/images/*
- https://fwdeveryone.com/t/*
- https://gametakes.com/*
- https://ganxy.com/*
- https://genesisplayer.io/*
- https://genius.com/videos/*
- https://getclippy.co/p/*
- https://getcloudapp.com/*
- https://getfader.com/*
- https://getshuffle.app/*
- https://getsportsme.com/*
- https://gfycat.com/*
- https://gif-vif.com/*
- https://gifs.com/*
- https://gifs.com/gif/*
- https://gifyourgame.com/*
- https://giphy.com/gifs/*
- https://gist.github.com/*
- https://gitpitch.com/*/*
- https://glitch.com/*
- https://glitter.club/*
- https://go.vooozer.com/*
- https://goabstract.com/*
- https://goodworld.me/*
- https://google.*/maps/*
- https://goplayalong.com/*
- https://gosynth.com/*
- https://gph.is/*
- https://grain.co/*
- https://graphcommons.com/graphs/*
- https://graphcommons.com/nodes/*
- https://graphiq.com/w/*
- https://greetor.com/*
- https://gridble.io/*
- https://guardian.co.uk/*/video/*/*/*/*
- https://guilded.gg/*
- https://hapyak.com/embed/*
- https://hardbound.co/*/*/*
- https://hatchxr.com/*
- https://herth.co/*
- https://heytwist.com/*
- https://hopbucket.com/plan-details/*
- https://huzza.io/*/live-stream/*
- https://icloud.com/keynote/*
- https://ifttt.com/recipes/*
- https://iheart.com/*
- https://iloopit.net/*/*
- https://indshine.com/*
- https://infogr.am/*
- https://infogram.com/*
- https://injurymap.com/*
- https://instaread.co/*
- https://intellogo.com/*
- https://iorad.com/player/*
- https://ipushpull.com/pages/domains/*/pages/*
- https://issuu.com/*/docs/*
- https://it.youtube.com/*
- https://itemsy.com/*
- https://itslit.com/*
- https://jovian.ml/*
- https://jscomplete.com/*
- https://jsitor.com/*
- https://khanacademy.org/*
- https://kidoju.com/*
- https://kit.com
- https://kralify.com/watch*
- https://kyso.io/*
- https://launch.newsinc.com/*
- https://lcontacts.herokuapp.com/embed/button/*
- https://lean-data-science.com/*
- https://like.co/*
- https://listennotes.com/*
- https://listle.io/*
- https://live.huffingtonpost.com/r/segment/*/*
- https://livestream.com/*
- https://ludus.one/*
- https://lynda.com/*
- https://lynda.com/*
- https://magisto.com/*
- https://makecode.com/*
- https://makecode.com/*
- https://maphubs.com/user/*/map/*
- https://maps.google.com/?*
- https://maps.google.com/maps/ms?*
- https://maps.google.com/maps?*
- https://maps.mysidewalk.com/*
- https://marvelapp.com/*
- https://medal.tv/*
- https://media.giphy.com/media/*
- https://medibang.com/sv/*
- https://meedle.io/*
- https://meetu.ps/*
- https://megaphone.fm/*
- https://megavisor.com/en/view/*
- https://megavisor.com/view/*
- https://millioneyez.com/*
- https://minko.io/s/
- https://mix.office.com/MyMixes/Details/*
- https://mix.office.com/embed/*
- https://mix.office.com/mix/*
- https://mix.office.com/watch/*
- https://mixbit.com/v/*
- https://momento360.com/e/u/*
- https://momento360.com/e/uc/*
- https://money.cnn.com/video/*
- https://money.cnn.com/videos/*
- https://moveshelf.com/*
- https://mpembed.com/*
- https://msn.foxsports.com/video*
- https://msnbc.msn.com/*/watch/*
- https://multimedia.foxsports.com/m/video/*/*
- https://muralapp.io/*
- https://my.matterport.com/show/*
- https://my.panomoments.com/*
- https://my.storygami.com/video/*
- https://my.webboards.fr/*
- https://mybeweeg.com/w/*
- https://mymixtapez.com/*
- https://myvideoplace.tv/*
- https://namchey.com/*
- https://naturalatlas.com/*
- https://nbcnews.com/*
- https://neatclip.com/*
- https://newhive.com/*/*
- https://newhive.com/*/*
- https://nodalview.com/*
- https://nom.com/post/*
- https://npmcharts.com/*
- https://nr8.com/embed/*
- https://nuggetcharts.com/*
- https://oddshot.tv/*
- https://odiocast.com/*
- https://oice.com/*
- https://okluffa.com/*
- https://omniscope.me/*
- https://omny.fm/*
- https://open.spotify.com/*
- https://openings.moe/*
- https://openprocessing.org/*
- https://orbitvu.com/001/*
- https://oumy.com/v/*
- https://overflow.io/*
- https://parkfy.com/*
- https://pasteapp.com/*
- https://pastebin.com/*
- https://patching.io/*
- https://pinecast.co/*
- https://pippa.io/*
- https://pixdor.com/*
- https://pl.kotl.in/*
- https://platform.vixyvideo.com/*
- https://platform.vixyvideo.com/*
- https://play.buto.tv/*
- https://play.kotlinlang.org/embed#*
- https://play.radiopublic.com/*
- https://play.soundsgood.co/*
- https://play.spotify.com/*
- https://player.entrypoint.live/*
- https://player.megaphone.fm/*
- https://player.videopath.com/*
- https://player.vimeo.com/*
- https://players.brightcove.net/*
- https://playpost.app/*
- https://plays.tv/*/*
- https://plnkr.co/*
- https://plnkr.co/*
- https://plotly.com/*
- https://plus.google.com/*
- https://polarishare.com/*
- https://polaroidswing.com/p/*
- https://pollforall.com/*
- https://pollsify.com/*
- https://pollstar.com/*
- https://popchest.com/*/
- https://portal.paratii.video/*
- https://posixion.com/*
- https://powered.by.rabbut.com/p/*
- https://pressekompass.net/*
- https://prezi.com/*/*
- https://procfu.com/*
- https://producthunt.com/*
- https://public.chartblocks.com/c/*
- https://publicgood.com/campaign/*
- https://publicgood.com/org/*
- https://publicgood.com/org/*/campaign/*
- https://publicinput.com/*
- https://publish.viostream.com/play/*
- https://publit.io/*
- https://publons.com/author/*
- https://pulse.qa/*
- https://qanda.co/q/*
- https://quantum-circuit.com/*
- https://qumucloud.com/*
- https://quora.com/*/answer/*
- https://qwip.in/watch/*
- https://qwip.it/watch/*
- https://radiopublic.com/*
- https://rapidengage.com/s/*
- https://rave.dj/*
- https://reading.fm/*
- https://readtapestry.com/s/*/
- https://redivis.com/r/*
- https://reelhouse.org/*
- https://registry.bitmark.com/*
- https://rekt.gg/*
- https://relayto.com/*
- https://relive.cc/view/*
- https://repl.it/*
- https://repl.it/*
- https://replay.infinity.fm/*
- https://represent.com/*
- https://reuters.com/video/*
- https://riffsy.com/*
- https://rocketium.com/*
- https://rogertalk.com/*
- https://roshiclips.com/watch*
- https://rumble.com/*
- https://runelm.io/*/*
- https://runkit.com/*
- https://scalafiddle.io/*
- https://scapic.com/*
- https://scorebat.com/*
- https://screen.yahoo.com/*/*
- https://screenhunters.com/*
- https://scribblemaps.com/maps/view/*/*
- https://scribd.com/doc/*
- https://scribd.com/documents/*
- https://scribd.com/mobile/documents/*
- https://scrimba.com/*
- https://searchie.io/*
- https://secure.plays.tv/*/*
- https://seekbeak.com/v/*
- https://sendvid.com/*
- https://serenader.io/*
- https://services.momindum.com/embedly/*
- https://sfx.io/*
- https://sheetsu.com/tables/*
- https://sidewire.com/*/*/*
- https://simmer.io/*/*
- https://sketchfab.com/models/*
- https://sketchfab.com/show/*
- https://skip.st/one/*
- https://sleeperbot.com/share/*
- https://slidesha.re/*
- https://slidetosubscribe.com/*
- https://slidr.io/*/*
- https://snack.expo.io/*
- https://snappd\.tv/*
- https://snipaclip.com/*
- https://snipit.io/*
- https://socialexplorer.com/*
- https://song.link/*
- https://soundcloud.com/*
- https://soundcloud.com/*/*
- https://soundcloud.com/*/sets/*
- https://soundcloud.com/groups/*
- https://spaces.archilogic.com/3d/*
- https://spaces.archilogic.com/model/*
- https://speakerdeck.com/*/*
- https://speakytext.com/*
- https://sphereplay.com/*
- https://spiegel.de/video/*
- https://spkt.io/*
- https://spott.tv/*
- https://spreaker.com/*
- https://sproutvideo.com/videos/*
- https://stackblitz.com/*
- https://stagevids.com/watch*
- https://stanza.co/*
- https://stepic.org/*
- https://stonly.com/*
- https://store.pixdor.com/*
- https://storeo.io/*
- https://stories.nws.ai/*
- https://storribook.com/articles/view/*/*
- https://storyforj.com/*
- https://storygami.com/v/*
- https://storymaps.arcgis.com/stories/*
- https://streamable.com/*
- https://streamio.com/api/v1/*
- https://streamr.network/*
- https://sudomemo.net/*
- https://superstack.io/v/*
- https://supgif.com/*
- https://svrf.com/*
- https://sway.office.com/*
- https://swiftsnip.com/*
- https://swymrelay.com/*
- https://talkshow.im/show/*
- https://tambur.co/*
- https://tapewrite.com/*
- https://tech.io/snippet/*
- https://tenor.co/*
- https://tenor.com/*
- https://terminaid.com/*
- https://texblocks.com/*
- https://theguardian.com/*/video/*/*/*/*
- https://theonion.com/video/*
- https://thesportsme.com/*
- https://thinglink.com/*
- https://threesixty.tours/*
- https://tiktok.com/*
- https://today.msnbc.msn.com/id/*/ns/*
- https://today.msnbc.msn.com/id/*/vp/*
- https://tr.instela.com/*
- https://tumblr.com/*
- https://tun.in/*
- https://tunein.com/*
- https://twitch.tv/*
- https://typecast.ai/*
- https://uilicious.com/*
- https://uploadly.com/*
- https://upscri.be/*
- https://urtak.com/clr/*
- https://urtak.com/u/*
- https://usehappen.com/*
- https://useloom.com/share/*
- https://v.embedly.com/*
- https://vectary.com/*
- https://vectorlogo.zone/*
- https://verasity.io/player*
- https://verse.com/stories/*
- https://vid.me/*
- https://vidd.me/*
- https://video.esri.com/*
- https://video.forbes.com/fvn/*
- https://video.foxbusiness.com/v/*
- https://video.foxnews.com/v/*
- https://video214.com/play/*
- https://vidgrid.com/*
- https://vidl.it/*
- https://view.genial.ly/*
- https://view.stacker.cc/*
- https://viewer.archilogic.com/*http://spaces.archilogic.com/3d/*
- https://vilynx.com/video/*
- https://vimeo.com/*
- https://vimsical.com/vims/*
- https://vine.co/v/*
- https://vizamp.com/player/*
- https://vizor.io/*/*
- https://vizydrop.com/*
- https://vlipsy.com/*
- https://vlurb.co/*
- https://voicepods.com/*
- https://vrbfoto.com/f/*
- https://vrchive.com/*
- https://vysda.com/*
- https://w.graphiq.com/w/*
- https://walkinto.in/*/*
- https://webassembly.studio/*
- https://websitevoice.com/*
- https://wedonthavetime.org/*
- https://weekendsuperheroes.com/*
- https://whooshkaa.com/*
- https://wi.st/*
- https://widgetic.com/*
- https://widgets.feedbeaver.com/*
- https://wistia.com/*
- https://with.in/watch/*
- https://withkoji.com/*
- https://wonderbooth.com.my/*
- https://worthyt.io/*
- https://wribbn.com/*
- https://writeinstone.com/*
- https://www.allego.com/*
- https://www.altizure.com/project/*
- https://www.alugha.com/videos/*
- https://www.askwhale.com/q/*
- https://www.boston.com/*video*
- https://www.boston.com/video*
- https://www.braid.io/embed-tile/*
- https://www.brainshark.com/*/*
- https://www.branchtrack.com/projects/*
- https://www.calameo.com/*
- https://www.canva.com/design/*
- https://www.changelog.com/*
- https://www.clippituser.tv/*
- https://www.cnbc.com/id/*/play/1/video/*
- https://www.cnbc.com/id/*?*video*
- https://www.cnn.com/video/*
- https://www.cnn.com/videos/*
- https://www.cnn.com/videos/*
- https://www.codiva.io/p/*
- https://www.datasmoothie.com/*/*
- https://www.dnbradio.com/*
- https://www.dreambroker.com/channel/*
- https://www.exif.co/*/i/*
- https://www.facebook.com/*/photos/*
- https://www.facebook.com/*/posts/*
- https://www.facebook.com/*/videos/*
- https://www.facebook.com/events/*
- https://www.facebook.com/photo.php*
- https://www.facebook.com/video.php*
- https://www.figma.com/file/*
- https://www.figma.com/proto/*
- https://www.flat.io/score/*
- https://www.flickr.com/photos/*
- https://www.foursquare.com/*
- https://www.frontback.me/p/*
- https://www.fwdeveryone.com/t/*
- https://www.ganxy.com/*
- https://www.getsportsme.com/*
- https://www.gifs.com/*
- https://www.gifs.com/gif/*
- https://www.globalgiving.org/funds/*
- https://www.globalgiving.org/microprojects/*
- https://www.globalgiving.org/projects/*
- https://www.google.*/maps/*
- https://www.gradba.se/v/*
- https://www.graphiq.com/w/*
- https://www.guardian.co.uk/*/video/*/*/*/*
- https://www.hapyak.com/embed/*
- https://www.highly.co/hl/*
- https://www.icloud.com/keynote/*
- https://www.instagram.com/p/*
- https://www.iorad.com/player/*
- https://www.ipushpull.com/pages/domains/*/pages/*
- https://www.jauntvr.com/title/*
- https://www.khanacademy.org/*
- https://www.kickstarter.com/projects/*/*
- https://www.last.fm/music/*
- https://www.last.fm/music/*/*
- https://www.last.fm/music/*/_/*
- https://www.last.fm/music/+images/*
- https://www.last.fm/music/+videos/*
- https://www.magisto.com/*
- https://www.maphubs.com/user/*/map/*
- https://www.maprosoft.com/app/map*
- https://www.maven.video/*
- https://www.medibang.com/sv/*
- https://www.megafono.io/*
- https://www.moviemogul.io/*
- https://www.msnbc.msn.com/*/watch/*
- https://www.msnbc.msn.com/id/*/ns/*
- https://www.msnbc.msn.com/id/*/vp/*
- https://www.nbcnews.com/*
- https://www.newhive.com/*/*
- https://www.npr.org/*/*/*/*/*
- https://www.npr.org/*/*/*/*/*/*
- https://www.npr.org/*/*/*/*/*/*/*
- https://www.npr.org/templates/story/story.php*
- https://www.oddshot.tv/*
- https://www.oumy.com/v/*
- https://www.pastery.net/*
- https://www.pexels.com/photo/*
- https://www.popchest.com/*/
- https://www.publons.com/author/*
- https://www.quora.com/*/answer/*
- https://www.qzzr.com/quiz/*
- https://www.radiopublic.com/*
- https://www.rdio.com/#/artist/*/album/*
- https://www.rdio.com/artist/*/album/*
- https://www.redivis.com/r/*
- https://www.reelhouse.org/*
- https://www.rekt.gg/*
- https://www.relayto.com/*
- https://www.relive.cc/view/*
- https://www.reuters.com/video/*
- https://www.rogertalk.com/*
- https://www.scribblemaps.com/maps/view/*/*
- https://www.scribd.com/doc/*
- https://www.scribd.com/documents/*
- https://www.scribd.com/mobile/documents/*
- https://www.simplecast.com/s/*
- https://www.slideshare.net/*/*
- https://www.slideshare.net/mobile/*/*
- https://www.sociale.co/question/*
- https://www.socialexplorer.com/*
- https://www.spiegel.de/video/*
- https://www.streamio.com/api/v1/*
- https://www.sudomemo.net/*
- https://www.talkshow.im/show/*
- https://www.ted.com/index.php/talks/*.html*
- https://www.ted.com/index.php/talks/lang/*/*.html*
- https://www.ted.com/talks/*
- https://www.ted.com/talks/*.html*
- https://www.ted.com/talks/lang/*/*.html*
- https://www.theguardian.com/*/video/*/*/*/*
- https://www.theonion.com/video/*
- https://www.vevo.com/video/*
- https://www.vevo.com/watch/*
- https://www.vibby.com/v/*
- https://www.vibby.com/watch*
- https://www.vimeo.com/*
- https://www.vine.co/v/*
- https://www.vizamp.com/player/*
- https://www.wedgies.com/question/*
- https://www.wikimedia.org/wiki/File*
- https://www.wikipedia.org/wiki/*
- https://www.yelp.com/*&hrid=.+
- https://www.youtube.com/attribution_link*
- https://www.youtube.com/embed/*
- https://www.youtube.com/gif*
- https://www.zeit.de/video/*
- https://xtracomedy.com/*
- https://yahoo.com/movies/*
- https://youtu.be/*
- https://youtube.ca/*
- https://youtube.co.uk/*
- https://youtube.com.br/*
- https://youtube.com/attribution_link*
- https://youtube.com/gif*
- https://youtube.es/*
- https://youtube.fr/*
- https://youtube.ie/*
- https://youtube.jp/*
- https://youtube.nl/*
- https://youtube.pl/*
- https://zeit.de/video/*
- https://ziggeo.io/*
- https://zoomable.ca/*
- https?://embed.ly/code*
- https?://kuula.co/post/*
ruby-oembed-0.18.1/lib/oembed/providers/aggregators/noembed_urls.yml 0000644 0000041 0000041 00000027377 14740472417 025621 0 ustar www-data www-data ---
- http://(?:www\.)?theverge\.com/\d{4}/\d{1,2}/\d{1,2}/\d+/[^/]+/?$
- http://(?:www\.)?twitpic\.com/([^/]+)
- http://(?:www\.)?xkcd\.com/\d+/?
- http://amzn\.com/([^/]+)
- http://arstechnica\.com/[^/]+/\d+/\d+/[^/]+/?$
- http://bash\.org/\?(\d+)
- http://boingboing\.net/\d{4}/\d{2}/\d{2}/[^/]+\.html
- http://cl\.ly/(?:image/)?[0-9a-zA-Z]+/?$
- http://gfycat\.com/([a-zA-Z]+)
- http://lockerz\.com/[sd]/\d+
- http://picplz\.com/user/[^/]+/pic/[^/]+
- http://qik\.com/video/.*
- http://skit.ch/[^/]+
- http://tl\.gd/[^/]+
- http://trailers\.apple\.com/trailers/[^/]+/[^/]+
- http://www.traileraddict.com/trailer/[^/]+/trailer
- http://www\.amazon\.com/(?:.+/)?[gd]p/(?:product/)?(?:tags-on-product/)?([a-zA-Z0-9]+)
- http://www\.asciiartfarts\.com/[0-9]+\.html
- http://www\.clickhole\.com/[^/]+/[^/]?
- http://www\.duffelblog\.com/\d{4}/\d{1,2}/[^/]+/?$
- http://www\.monoprice\.com/products/product\.asp\?.*p_id=\d+
- http://www\.theonion\.com/articles?/[^/]+/?
- http://www\.twitlonger\.com/show/[a-zA-Z0-9]+
- http://www\.urbandictionary\.com/define\.php\?term=.+
- https://tube.switch.ch/videos/([a-z0-9]+)
- https?://(?:[^\.]+\.)?(?:youtu\.be|youtube\.com/embed)/([a-zA-Z0-9_-]+)
- https?://(?:[^\.]+\.)?youtube\.com/watch/?\?(?:.+&)?v=([^&]+)
- https?://(?:www.)?skitch.com/([^/]+)/[^/]+/.+
- https?://(?:www\.)?avclub\.com/article/[^/]+/?$
- https?://(?:www\.)?vice\.com/[^/]+/?
- https?://(?:www\.)?vimeo\.com/.+
- https?://(?:www\.)?wired\.com/([^/]+/)?\d+/\d+/[^/]+/?$
- https?://(?:www\.)spreaker\.com/.+
- https?://(?:www|mobile\.)?twitter\.com/(?:#!/)?([^/]+)/status(?:es)?/(\d+)
- https?://.*\.channel\.geographs\.org/.*
- https?://.*\.deviantart\.com/.*#/d.*
- https?://.*\.deviantart\.com/art/.*
- https?://.*\.didacte\.com/a/course/.*
- https?://.*\.docdroid\.net/.*
- https?://.*\.docdroid\.net/.*
- https?://.*\.flat\.io/score/.*
- https?://.*\.flickr\.com/photos/.*
- https?://.*\.geograph\.co\.uk/.*
- https?://.*\.geograph\.ie/.*
- https?://.*\.geograph\.org\.gg/.*
- https?://.*\.geograph\.org\.je/.*
- https?://.*\.geograph\.org\.uk/.*
- https?://.*\.inphood\.com/.*
- https?://.*\.nanoo\.pro/link/.*
- https?://.*\.nanoo\.pro/link/.*
- https?://.*\.nanoo\.tv/link/.*
- https?://.*\.nanoo\.tv/link/.*
- https?://.*\.nfb\.ca/film/.*
- https?://.*\.nytimes\.com/.*
- https?://.*\.polldaddy\.com/poll/.*
- https?://.*\.polldaddy\.com/ratings/.*
- https?://.*\.polldaddy\.com/s/.*
- https?://.*\.screen9\.tv/.*
- https?://.*\.silk\.co/explore/.*
- https?://.*\.silk\.co/explore/.*
- https?://.*\.silk\.co/s/embed/.*
- https?://.*\.silk\.co/s/embed/.*
- https?://.*\.smugmug\.com/.*
- https?://.*\.spreaker\.com/.*
- https?://.*\.spreaker\.com/.*
- https?://.*\.uol\.com\.br/video/.*
- https?://.*\.uol\.com\.br/view/.*
- https?://.*\.ustream\.com/.*
- https?://.*\.ustream\.tv/.*
- https?://.*\.wikimedia\.org/.*_geograph\.org\.uk_.*
- https?://.*\.wiredrive\.com/.*
- https?://.*\.wizer\.me/learn/.*
- https?://.*\.wizer\.me/learn/.*
- https?://.*\.wizer\.me/preview/.*
- https?://.*\.wizer\.me/preview/.*
- https?://.*\.yfrog\.com/.*
- https?://alpha\.app\.net/.*/post/.*
- https?://animatron\.com/project/.*
- https?://animoto\.com/play/.*
- https?://app\.cyranosystems\.com/msg/.*
- https?://app\.sellwithport\.com/#/buyer/.*
- https?://audiosnaps\.com/k/.*
- https?://beta\.modelo\.io/embedded/.*
- https?://blackfire\.io/profiles/.*/graph
- https?://blackfire\.io/profiles/compare/.*/graph
- https?://buttondown\.email/.*
- https?://cacoo\.com/diagrams/.*
- https?://carbonhealth\.com/practice/.*
- https?://channel-islands\.geograph\.org/.*
- https?://channel-islands\.geographs\.org/.*
- https?://chirb\.it/.*
- https?://clips\.twitch\.tv/.*
- https?://clips\.twitch\.tv/.*
- https?://clyp\.it/.*
- https?://clyp\.it/playlist/.*
- https?://codepen\.io/.*
- https?://codepen\.io/.*
- https?://codepoints\.net/.*
- https?://codepoints\.net/.*
- https?://codesandbox\.io/embed/.*
- https?://codesandbox\.io/s/.*
- https?://commaful\.com/play/.*
- https?://console\.screen9\.com/.*
- https?://content\.streamonecloud\.net/embed/.*
- https?://coub\.com/embed/.*
- https?://coub\.com/view/.*
- https?://crowdranking\.com/.*/.*
- https?://db\.tt/[a-zA-Z0-9]+
- https?://de\.slideshare\.net/.*/.*
- https?://docdro\.id/.*
- https?://docdro\.id/.*
- https?://docs\.com/.*
- https?://dotsub\.com/view/.*
- https?://edocr\.com/docs/.*
- https?://egliseinfo\.catholique\.fr/.*
- https?://embedarticles\.com/.*
- https?://es\.slideshare\.net/.*/.*
- https?://eyrie\.io/board/.*
- https?://eyrie\.io/sparkfun/.*
- https?://fav\.me/.*
- https?://fiso\.foxsports\.com\.au/isomorphic-widget/.*
- https?://fiso\.foxsports\.com\.au/isomorphic-widget/.*
- https?://flat\.io/score/.*
- https?://flic\.kr/p/.*
- https?://fr\.slideshare\.net/.*/.*
- https?://framebuzz\.com/v/.*
- https?://framebuzz\.com/v/.*
- https?://geo-en\.hlipp\.de/.*
- https?://geo\.hlipp\.de/.*
- https?://germany\.geograph\.org/.*
- https?://gfycat\.com/.*
- https?://gfycat\.com/.*
- https?://giphy\.com/gifs/.*
- https?://gph\.is/.*
- https?://gty\.im/.*
- https?://gyazo\.com/.*
- https?://huffduffer\.com/.*/.*
- https?://ifttt\.com/recipes/.*
- https?://img\.catbo\.at/.*
- https?://imgur\.com/(?:[^\/]+/)?[0-9a-zA-Z]+$
- https?://infogr\.am/.*
- https?://instagr\.am/p/.*
- https?://instagr\.am/p/.*
- https?://instagram\.com/p/.*
- https?://instagram\.com/p/.*
- https?://jdr\.knacki\.info/meuh/.*
- https?://jdr\.knacki\.info/meuh/.*
- https?://kit\.com/.*/.*
- https?://kit\.com/.*/.*
- https?://learningapps\.org/.*
- https?://live\.amcharts\.com/.*
- https?://mathembed\.com/latex\?inputText=.*
- https?://mathembed\.com/latex\?inputText=.*
- https?://me\.me/i/.*
- https?://media\.giphy\.com/media/.*/giphy\.gif
- https?://meetu\.ps/.*
- https?://meetup\.com/.*
- https?://mix\.office\.com/embed/.*
- https?://mix\.office\.com/watch/.*
- https?://moby\.to/.*
- https?://muki\.io/(embed/)?(.+)
- https?://mybeweeg\.com/w/.*
- https?://nanoo\.pro/link/.*
- https?://nanoo\.pro/link/.*
- https?://nanoo\.tv/link/.*
- https?://nanoo\.tv/link/.*
- https?://news.vice\.com/[^/]+/?
- https?://nytimes\.com/.*
- https?://odds\.com\.au/.*
- https?://official\.fm/playlists/.*
- https?://official\.fm/tracks/.*
- https?://on\.aol\.com/video/.*
- https?://onsizzle\.com/i/.*
- https?://orbitvu\.co/001/.*/1/2/orbittour/.*/view
- https?://orbitvu\.co/001/.*/1/2/orbittour/.*/view
- https?://orbitvu\.co/001/.*/2/orbittour/.*/view
- https?://orbitvu\.co/001/.*/2/orbittour/.*/view
- https?://orbitvu\.co/001/.*/ov3601/.*/view
- https?://orbitvu\.co/001/.*/ov3601/.*/view
- https?://orbitvu\.co/001/.*/ov3601/view
- https?://orbitvu\.co/001/.*/ov3601/view
- https?://orbitvu\.co/001/.*/ov3602/.*/view
- https?://orbitvu\.co/001/.*/ov3602/.*/view
- https?://pastery\.net/.*
- https?://pastery\.net/.*
- https?://path\.com/p/([0-9a-zA-Z]+)$
- https?://photos\.app\.net/.*/.*
- https?://play\.soundsgood\.co/playlist/.*
- https?://player\.indacolive\.com/player/jwp/clients/.*
- https?://player\.ubideo\.com/.*
- https?://player\.vimeo\.com/video/.*
- https?://portfolium\.com/entry/.*
- https?://pt\.slideshare\.net/.*/.*
- https?://public\.chartblocks\.com/c/.*
- https?://punters\.com\.au/.*
- https?://rapidengage\.com/s/.*
- https?://reddit\.com/r/.*/comments/.*/.*
- https?://reports\.zoho\.com/ZDBDataSheetView\.cc\?OBJID=1432535000000003002&STANDALONE=true&INTERVAL=120&DATATYPESYMBOL=false&REMTOOLBAR=false&SEARCHBOX=true&INCLUDETITLE=true&INCLUDEDESC=true&SHOWHIDEOPT=true
- https?://repubhub\.icopyright\.net/freePost\.act\?.*
- https?://roomshare\.jp/en/post/.*
- https?://roomshare\.jp/post/.*
- https?://rwire\.com/.*
- https?://scribblemaps\.com/maps/view/.*
- https?://scribblemaps\.com/maps/view/.*
- https?://shoud\.io/.*
- https?://shoudio\.com/.*
- https?://showtheway\.io/to/.*
- https?://sketchfab\.com/.*/folders/.*
- https?://sketchfab\.com/models/.*
- https?://sketchfab\.com/models/.*
- https?://soundcloud.com/.*/.*
- https?://soundcloud\.com/.*
- https?://soundsgood\.co/playlist/.*
- https?://speakerdeck\.com/.*/.*
- https?://speakerdeck\.com/.*/.*
- https?://sta\.sh/.*
- https?://staging\.cyranosystems\.com/msg/.*
- https?://store\.pixdor\.com/map/.*/show
- https?://store\.pixdor\.com/place-marker-widget/.*/show
- https?://streamable\.com/.*
- https?://streamable\.com/.*
- https?://sway\.com/.*
- https?://ted\.com/talks/.*
- https?://theysaidso\.com/image/.*
- https?://twitch\.tv/.*
- https?://twitch\.tv/.*
- https?://twitter\.com/.*/status/.*
- https?://utposts\.com/products/.*
- https?://utposts\.com/products/.*
- https?://uttles\.com/uttle/.*
- https?://v\.nldg\.me/.+
- https?://veer\.tv/videos/.*
- https?://veervr\.tv/videos/.*
- https?://videos\.sapo\.pt/.*
- https?://vidl\.it/.*
- https?://vimeo\.com/.*
- https?://vimeo\.com/album/.*/video/.*
- https?://vimeo\.com/channels/.*/.*
- https?://vimeo\.com/groups/.*/videos/.*
- https?://vimeo\.com/ondemand/.*/.*
- https?://vine.co/v/[a-zA-Z0-9]+
- https?://vlipsy\.com/.*
- https?://www\.(dropbox\.com/s/.+\.(?:jpg|png|gif))
- https?://www\.23hq\.com/.*/photo/.*
- https?://www\.animatron\.com/project/.*
- https?://www\.audiomack\.com/album/.*
- https?://www\.audiomack\.com/playlist/.*
- https?://www\.audiomack\.com/song/.*
- https?://www\.circuitlab\.com/circuit/.*
- https?://www\.clipland\.com/v/.*
- https?://www\.clipland\.com/v/.*
- https?://www\.codepoints\.net/.*
- https?://www\.codepoints\.net/.*
- https?://www\.collegehumor\.com/video/.*
- https?://www\.dailymile\.com/people/.*/entries/.*
- https?://www\.dailymotion\.com/video/.*
- https?://www\.dipity\.com/.*/.*/
- https?://www\.docs\.com/.*
- https?://www\.facebook\.com/.*/videos/.*
- https?://www\.facebook\.com/video\.php
- https?://www\.funnyordie\.com/videos/.*
- https?://www\.gfycat\.com/.*
- https?://www\.gfycat\.com/.*
- https?://www\.giantbomb\.com/videos/[^/]+/\d+-\d+/?
- https?://www\.globalgiving\.org/((micro)?projects|funds)/.*
- https?://www\.hulu\.com/watch/.*
- https?://www\.ifixit\.com/Guide/View/.*
- https?://www\.inoreader\.com/oembed/
- https?://www\.instagr\.am/p/.*
- https?://www\.instagr\.am/p/.*
- https?://www\.instagram\.com/p/.*
- https?://www\.instagram\.com/p/.*
- https?://www\.isnare\.com/.*
- https?://www\.kickstarter\.com/projects/.*
- https?://www\.kidoju\.com/en/x/.*/.*
- https?://www\.kidoju\.com/fr/x/.*/.*
- https?://www\.kitchenbowl\.com/recipe/.*
- https?://www\.mixcloud\.com/.*/.*/
- https?://www\.mobypicture\.com/user/.*/view/.*
- https?://www\.nooledge\.com/\!/Vid/.+
- https?://www\.nytimes\.com/svc/oembed
- https?://www\.odds\.com\.au/.*
- https?://www\.oumy\.com/v/.*
- https?://www\.pastery\.net/.*
- https?://www\.pastery\.net/.*
- https?://www\.punters\.com\.au/.*
- https?://www\.quiz\.biz/quizz-.*\.html
- https?://www\.quizz\.biz/quizz-.*\.html
- https?://www\.reverbnation\.com/.*
- https?://www\.reverbnation\.com/.*/songs/.*
- https?://www\.screenr\.com/.*/
- https?://www\.scribblemaps\.com/maps/view/.*
- https?://www\.scribblemaps\.com/maps/view/.*
- https?://www\.scribd\.com/doc/.*
- https?://www\.shortnote\.jp/view/notes/.*
- https?://www\.slideshare\.net/.*/.*
- https?://www\.socialexplorer\.com/.*/edit
- https?://www\.socialexplorer\.com/.*/embed
- https?://www\.socialexplorer\.com/.*/explore
- https?://www\.socialexplorer\.com/.*/view
- https?://www\.sutori\.com/story/.*
- https?://www\.sway\.com/.*
- https?://www\.tickcounter\.com/countdown/.*
- https?://www\.tickcounter\.com/countdown/.*
- https?://www\.tickcounter\.com/countup/.*
- https?://www\.tickcounter\.com/countup/.*
- https?://www\.tickcounter\.com/ticker/.*
- https?://www\.tickcounter\.com/ticker/.*
- https?://www\.tickcounter\.com/worldclock/.*
- https?://www\.tickcounter\.com/worldclock/.*
- https?://www\.topy\.se/image/.*
- https?://www\.twitch\.tv/.*
- https?://www\.twitch\.tv/.*
- https?://www\.utposts\.com/products/.*
- https?://www\.utposts\.com/products/.*
- https?://www\.vevo\.com/.*
- https?://www\.vevo\.com/.*
- https?://www\.videojug\.com/film/.*
- https?://www\.videojug\.com/interview/.*
- https?://yfrog\.us/.*
ruby-oembed-0.18.1/lib/oembed/providers/spotify.rb 0000644 0000041 0000041 00000001231 14740472417 022112 0 ustar www-data www-data module OEmbed
class Providers
# Provider for spotify.com
# https://developer.spotify.com/documentation/embeds/reference/oembed
# https://developer.spotify.com/documentation/embeds/tutorials/using-the-oembed-api
Spotify = OEmbed::Provider.new(
"https://open.spotify.com/oembed",
format: :json
)
Spotify << "http://open.spotify.com/*"
Spotify << "https://open.spotify.com/*"
Spotify << "http://play.spotify.com/*"
Spotify << "https://play.spotify.com/*"
# https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids
Spotify << /^spotify\:(.*?)/
add_official_provider(Spotify)
end
end
ruby-oembed-0.18.1/lib/oembed/providers/instagram.rb 0000644 0000041 0000041 00000003531 14740472417 022407 0 ustar www-data www-data module OEmbed
class Providers
# Provider for instagram.com
# See https://developers.facebook.com/docs/instagram/oembed/
Instagram = OEmbed::Provider.new(
"https://graph.facebook.com/v8.0/instagram_oembed",
required_query_params: { access_token: 'OEMBED_FACEBOOK_TOKEN' },
format: :json
)
Instagram << "http://instagr.am/p/*"
Instagram << "http://instagram.com/p/*"
Instagram << "http://www.instagram.com/p/*"
Instagram << "https://instagr.am/p/*"
Instagram << "https://instagram.com/p/*"
Instagram << "https://www.instagram.com/p/*"
Instagram << "http://instagr.am/tv/*"
Instagram << "http://instagram.com/tv/*"
Instagram << "http://www.instagram.com/tv/*"
Instagram << "https://instagr.am/tv/*"
Instagram << "https://instagram.com/tv/*"
Instagram << "https://www.instagram.com/tv/*"
Instagram << "http://instagram.com/reel/*"
Instagram << "http://www.instagram.com/reel/*"
Instagram << "https://instagram.com/reel/*"
Instagram << "https://www.instagram.com/reel/*"
# Note: even though Instagram is automatically registered as an official provider
# it will NOT resolve any URLs unless its access_token is set
# either via the OEMBED_FACEBOOK_TOKEN environment variable
# or by calling `OEmbed::Providers::Instagram.access_token = @your_token`
add_official_provider(Instagram, nil, access_token: {name: :facebook, method: :access_token})
# Respond to the `new` method to maintain backwards compatibility with v0.14.0
# See also:
# * https://github.com/ruby-oembed/ruby-oembed/pull/75
# * https://github.com/ruby-oembed/ruby-oembed/issues/77#issuecomment-727024682
# @deprecated *Note*: This method will be be removed in the future.
def Instagram.new(access_token:)
self.access_token = access_token
self
end
end
end
ruby-oembed-0.18.1/lib/oembed/providers/facebook_video.rb 0000644 0000041 0000041 00000002507 14740472417 023363 0 ustar www-data www-data module OEmbed
class Providers
# Provider for Facebook videos
# See https://developers.facebook.com/docs/plugins/oembed
# See https://developers.facebook.com/docs/graph-api/reference/v8.0/oembed-video
FacebookVideo = OEmbed::Provider.new(
"https://graph.facebook.com/v8.0/oembed_video",
required_query_params: { access_token: 'OEMBED_FACEBOOK_TOKEN' },
format: :json
)
FacebookVideo << 'https://www.facebook.com/*/videos/*'
FacebookVideo << 'https://www.facebook.com/video*'
# Note: even though FacebookVideo is automatically registered as an official provider
# it will NOT resolve any URLs unless its access_token is set
# either via the OEMBED_FACEBOOK_TOKEN environment variable
# or by calling `OEmbed::Providers::FacebookVideo.access_token = @your_token`
add_official_provider(FacebookVideo, nil, access_token: {name: :facebook, method: :access_token})
# Respond to the `new` method to maintain backwards compatibility with v0.14.0
# See also:
# * https://github.com/ruby-oembed/ruby-oembed/pull/75
# * https://github.com/ruby-oembed/ruby-oembed/issues/77#issuecomment-727024682
# @deprecated *Note*: This method will be be removed in the future.
def FacebookVideo.new(access_token:)
self.access_token = access_token
self
end
end
end
ruby-oembed-0.18.1/lib/oembed/providers/builtin_providers.rb 0000644 0000041 0000041 00000030201 14740472417 024157 0 ustar www-data www-data # This file is used to load all built-in providers.
# In the short term most of them are specified in this file
# though we've _started_ moving provider definitions into their own files!
require 'oembed/providers/facebook_post'
require 'oembed/providers/facebook_video'
require 'oembed/providers/instagram'
require 'oembed/providers/matterport'
require 'oembed/providers/spotify'
require 'oembed/providers/tiktok'
module OEmbed
class Providers
# Provider for youtube.com
# http://apiblog.youtube.com/2009/10/oembed-support.html
#
# Options:
# * To get the iframe embed code
# OEmbed::Providers::Youtube.endpoint += "?iframe=1"
# * To get the flash/object embed code
# OEmbed::Providers::Youtube.endpoint += "?iframe=0"
# * To require https embed code
# OEmbed::Providers::Youtube.endpoint += "?scheme=https"
Youtube = OEmbed::Provider.new("https://www.youtube.com/oembed/?scheme=https")
Youtube << "http://*.youtube.com/*"
Youtube << "https://*.youtube.com/*"
Youtube << "http://*.youtu.be/*"
Youtube << "https://*.youtu.be/*"
add_official_provider(Youtube)
# Provider for codepen.io
CodePen = OEmbed::Provider.new("https://codepen.io/api/oembed")
CodePen << "http://codepen.io/*"
CodePen << "https://codepen.io/*"
add_official_provider(CodePen)
# Provider for flickr.com
Flickr = OEmbed::Provider.new("https://www.flickr.com/services/oembed/")
Flickr << "http://*.flickr.com/*"
Flickr << "https://*.flickr.com/*"
Flickr << "http://flic.kr/*"
Flickr << "https://flic.kr/*"
add_official_provider(Flickr)
# Provider for viddler.com
# http://developers.viddler.com/documentation/services/oembed/
Viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/")
Viddler << "http://*.viddler.com/*"
add_official_provider(Viddler)
# Provider for qik.com
# http://qik.com/blog/qik-embraces-oembed-for-embedding-videos/
Qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}")
Qik << "http://qik.com/*"
Qik << "http://qik.com/video/*"
add_official_provider(Qik)
# Provider for revision3.com
Revision3 = OEmbed::Provider.new("http://revision3.com/api/oembed/")
Revision3 << "http://*.revision3.com/*"
add_official_provider(Revision3)
# Provider for hulu.com
Hulu = OEmbed::Provider.new("https://www.hulu.com/api/oembed.{format}")
Hulu << "http://www.hulu.com/watch/*"
Hulu << "https://www.hulu.com/watch/*"
add_official_provider(Hulu)
# Provider for vimeo.com
# https://developer.vimeo.com/apis/oembed
Vimeo = OEmbed::Provider.new("https://vimeo.com/api/oembed.{format}")
Vimeo << "http://*.vimeo.com/*"
Vimeo << "https://*.vimeo.com/*"
add_official_provider(Vimeo)
# Provider for twitter.com
# https://dev.twitter.com/rest/reference/get/statuses/oembed
Twitter = OEmbed::Provider.new("https://publish.twitter.com/oembed", format: :json)
Twitter << "https://*.twitter.com/*/status/*"
Twitter << "https://*.x.com/*/status/*"
add_official_provider(Twitter)
# Provider for vine.co
# https://dev.twitter.com/web/vine/oembed
Vine = OEmbed::Provider.new("https://vine.co/oembed.{format}")
Vine << "http://*.vine.co/v/*"
Vine << "https://*.vine.co/v/*"
add_official_provider(Vine)
# Provider for slideshare.net
# http://www.slideshare.net/developers/oembed
Slideshare = OEmbed::Provider.new("https://www.slideshare.net/api/oembed/2")
Slideshare << 'http://*.slideshare.net/*/*'
Slideshare << 'https://*.slideshare.net/*/*'
Slideshare << 'http://*.slideshare.net/mobile/*/*'
Slideshare << 'https://*.slideshare.net/mobile/*/*'
add_official_provider(Slideshare)
# Provider for yfrog
# http://code.google.com/p/imageshackapi/wiki/OEMBEDSupport
Yfrog = OEmbed::Provider.new("https://www.yfrog.com/api/oembed", format: :json)
Yfrog << "http://yfrog.com/*"
add_official_provider(Yfrog)
# Provider for Giphy
Giphy = OEmbed::Provider.new("http://giphy.com/services/oembed")
Giphy << "http://giphy.com/*"
Giphy << "https://giphy.com/*"
add_official_provider(Giphy)
# Provider for imgur.com
Imgur = OEmbed::Provider.new("https://api.imgur.com/oembed.{format}")
Imgur << "https://*.imgur.com/gallery/*"
Imgur << "http://*.imgur.com/gallery/*"
add_official_provider(Imgur)
# Provider for Kickstarter
Kickstarter = OEmbed::Provider.new("https://www.kickstarter.com/services/oembed")
Kickstarter << "http://www.kickstarter.com/projects/*"
Kickstarter << "https://www.kickstarter.com/projects/*"
add_official_provider(Kickstarter)
# provider for mlg-tv
# http://tv.majorleaguegaming.com/oembed
MlgTv = OEmbed::Provider.new("http://tv.majorleaguegaming.com/oembed")
MlgTv << "http://tv.majorleaguegaming.com/video/*"
MlgTv << "http://mlg.tv/video/*"
add_official_provider(MlgTv)
# pownce.com closed in 2008
#Pownce = OEmbed::Provider.new("http://api.pownce.com/2.1/oembed.{format}")
#Pownce << "http://*.pownce.com/*"
#add_official_provider(Pownce)
# Provider for polleverywhere.com
PollEverywhere = OEmbed::Provider.new("http://www.polleverywhere.com/services/oembed/")
PollEverywhere << "http://www.polleverywhere.com/polls/*"
PollEverywhere << "http://www.polleverywhere.com/multiple_choice_polls/*"
PollEverywhere << "http://www.polleverywhere.com/free_text_polls/*"
add_official_provider(PollEverywhere)
# Provider for my.opera.com
# http://my.opera.com/devblog/blog/2008/12/02/embedding-my-opera-content-oembed
MyOpera = OEmbed::Provider.new("http://my.opera.com/service/oembed", format: :json)
MyOpera << "http://my.opera.com/*"
add_official_provider(MyOpera)
# Provider for clearspring.com
ClearspringWidgets = OEmbed::Provider.new("http://widgets.clearspring.com/widget/v1/oembed/")
ClearspringWidgets << "http://www.clearspring.com/widgets/*"
add_official_provider(ClearspringWidgets)
# Provider for nfb.ca
NFBCanada = OEmbed::Provider.new("http://www.nfb.ca/remote/services/oembed/")
NFBCanada << "http://*.nfb.ca/film/*"
add_official_provider(NFBCanada)
# Provider for scribd.com
Scribd = OEmbed::Provider.new("https://www.scribd.com/services/oembed")
Scribd << "http://*.scribd.com/*"
add_official_provider(Scribd)
# Provider for speakerdeck.com
# https://speakerdeck.com/faq#oembed
SpeakerDeck = OEmbed::Provider.new("https://speakerdeck.com/oembed.json")
SpeakerDeck << "http://speakerdeck.com/*/*"
SpeakerDeck << "https://speakerdeck.com/*/*"
add_official_provider(SpeakerDeck)
# Provider for movieclips.com
MovieClips = OEmbed::Provider.new("http://movieclips.com/services/oembed/")
MovieClips << "http://movieclips.com/watch/*/*/"
add_official_provider(MovieClips)
# Provider for 23hq.com
TwentyThree = OEmbed::Provider.new("http://www.23hq.com/23/oembed")
TwentyThree << "http://www.23hq.com/*"
add_official_provider(TwentyThree)
# Provider for soundcloud.com
# http://developers.soundcloud.com/docs/oembed
SoundCloud = OEmbed::Provider.new("https://soundcloud.com/oembed", format: :json)
SoundCloud << "http://*.soundcloud.com/*"
SoundCloud << "https://*.soundcloud.com/*"
add_official_provider(SoundCloud)
# Provider for skitch.com
# http://skitch.com/oembed/%3C/endpoint
Skitch = OEmbed::Provider.new("http://skitch.com/oembed")
Skitch << "http://*.skitch.com/*"
Skitch << "https://*.skitch.com/*"
add_official_provider(Skitch)
# Provider for TED
Ted = OEmbed::Provider.new("https://www.ted.com/talks/oembed.{format}")
Ted << "http://*.ted.com/talks/*"
Ted << "https://*.ted.com/talks/*"
add_official_provider(Ted)
# Provider for tumblr.com
Tumblr = OEmbed::Provider.new("http://www.tumblr.com/oembed/1.0/", format: :json)
Tumblr << "http://*.tumblr.com/post/*"
Tumblr << "https://*.tumblr.com/post/*"
add_official_provider(Tumblr)
## Provider for clikthrough.com
# http://corporate.clikthrough.com/wp/?p=275
#Clickthrough = OEmbed::Provider.new("http://www.clikthrough.com/services/oembed/")
#Clickthrough << "http://*.clikthrough.com/theater/video/*"
#add_official_provider(Clickthrough)
## Provider for kinomap.com
# http://www.kinomap.com/#!oEmbed
#Kinomap = OEmbed::Provider.new("http://www.kinomap.com/oembed")
#Kinomap << "http://www.kinomap.com/*"
#add_official_provider(Kinomap)
# Provider for oohembed.com, which is a provider aggregator. See
# OEmbed::Providers::OohEmbed.urls for a full list of supported url schemas.
# Embed.ly has taken over the oohembed.com domain and as of July 20 all oohEmbed
# request will require you use an API key. For details on the transition see
# http://blog.embed.ly/oohembed
OohEmbed = OEmbed::Provider.new("http://oohembed.com/oohembed/", format: :json)
OohEmbed << "http://*.5min.com/Video/*" # micro-video host
OohEmbed << %r{http://(.*?).amazon.(com|co.uk|de|ca|jp)/(.*?)/(gp/product|o/ASIN|obidos/ASIN|dp)/(.*?)} # Online product shopping
OohEmbed << "http://*.blip.tv/*"
OohEmbed << "http://*.clikthrough.com/theater/video/*"
OohEmbed << "http://*.collegehumor.com/video:*" # Comedic & original videos
OohEmbed << "http://*.thedailyshow.com/video/*" # Syndicated show
OohEmbed << "http://*.dailymotion.com/*"
OohEmbed << "http://dotsub.com/view/*"
OohEmbed << "http://*.flickr.com/photos/*"
OohEmbed << "http://*.funnyordie.com/videos/*" # Comedy video host
OohEmbed << "http://video.google.com/videoplay?*" # Video hosting
OohEmbed << "http://www.hulu.com/watch/*"
OohEmbed << "http://*.kinomap.com/*"
OohEmbed << "http://*.livejournal.com/"
OohEmbed << "http://*.metacafe.com/watch/*" # Video host
OohEmbed << "http://*.nfb.ca/film/*"
OohEmbed << "http://*.photobucket.com/albums/*"
OohEmbed << "http://*.photobucket.com/groups/*"
OohEmbed << "http://*.phodroid.com/*/*/*" # Photo host
OohEmbed << "http://qik.com/*"
OohEmbed << "http://*.revision3.com/*"
OohEmbed << "http://*.scribd.com/*"
OohEmbed << "http://*.slideshare.net/*" # Share presentations online
OohEmbed << "http://*.twitpic.com/*" # Picture hosting for Twitter
OohEmbed << "http://twitter.com/*/statuses/*" # Mirco-blogging network
OohEmbed << "http://*.viddler.com/explore/*"
OohEmbed << "http://www.vimeo.com/*"
OohEmbed << "http://www.vimeo.com/groups/*/videos/*"
OohEmbed << "http://*.wikipedia.org/wiki/*" # Online encyclopedia
OohEmbed << "http://*.wordpress.com/*/*/*/*" # Blogging Engine & community
OohEmbed << "http://*.xkcd.com/*" # A hilarious stick figure comic
OohEmbed << %r{http://yfrog.(com|ru|com.tr|it|fr|co.il|co.uk|com.pl|pl|eu|us)/(.*?)} # image & video hosting
OohEmbed << "http://*.youtube.com/watch*"
# Provider for noembed.com, which is a provider aggregator. See
# OEmbed::Providers::Noembed.urls for a full list of supported url schemas.
# https://noembed.com/#supported-sites
Noembed = OEmbed::Provider.new("https://noembed.com/embed")
# Add all known URL regexps for Noembed.
# To update this list run `rake oembed:update_noembed`
YAML.load_file(File.join(File.dirname(__FILE__), "/aggregators/noembed_urls.yml")).each do |url|
Noembed << Regexp.new(url)
end
add_official_provider(Noembed, :aggregators)
# Provider for Embedly.com, which is a provider aggregator. See
# OEmbed::Providers::Embedly.urls for a full list of supported url schemas.
# http://embed.ly/docs/endpoints/1/oembed
#
# You can append your Embed.ly API key to the provider so that all requests are signed
# OEmbed::Providers::Embedly.endpoint += "?key=#{my_embedly_key}"
#
# If you don't yet have an API key you'll need to sign up here: http://embed.ly/pricing
Embedly = OEmbed::Provider.new("http://api.embed.ly/1/oembed")
# Add all known URL regexps for Embedly. To update this list run `rake oembed:update_embedly`
YAML.load_file(File.join(File.dirname(__FILE__), "/aggregators/embedly_urls.yml")).each do |url|
Embedly << url
end
add_official_provider(Embedly, :aggregators)
end
end
ruby-oembed-0.18.1/lib/oembed/providers/matterport.rb 0000644 0000041 0000041 00000000444 14740472417 022623 0 ustar www-data www-data module OEmbed
class Providers
# Provider for my.matterport.com
Matterport = OEmbed::Provider.new(
"https://my.matterport.com/api/v1/models/oembed/",
format: :json
)
Matterport << "https://*.matterport.com/show/*"
add_official_provider(Matterport)
end
end
ruby-oembed-0.18.1/lib/oembed/response.rb 0000644 0000041 0000041 00000006571 14740472417 020252 0 ustar www-data www-data module OEmbed
# Contains oEmbed data about a URL, as returned by an OEmbed::Provider. The data
# stored in Response instances can be accessed by either using the field method
# _or_ by using the appropriate automatically-defined helper method.
#
# For example:
# @response.type #=> 'rich'
# @response.field('width') #=> '500'
# @response.width #=> '500'
class Response
# An Hash of data (probably from a Provider) just as it was parsed.
attr_reader :fields
# The Provider instance that generated this Response
attr_reader :provider
# The URL that was sent to the provider, that this Response contains data about.
attr_reader :request_url
# The name of the format used get this data from the Provider (e.g. 'json').
attr_reader :format
# Create a new Response instance of the correct type given raw
# which is data from the provider, about the url, in the given
# format that needs to be decoded.
def self.create_for(raw, provider, url, format)
fields = OEmbed::Formatter.decode(format, raw)
resp_type = case fields['type']
when 'photo' then OEmbed::Response::Photo
when 'video' then OEmbed::Response::Video
when 'link' then OEmbed::Response::Link
when 'rich' then OEmbed::Response::Rich
else self
end
resp_type.new(fields, provider, url, format)
end
def initialize(fields, provider, url=nil, format=nil)
@fields = fields
@provider = provider
@request_url = url
@format = format
define_methods!
end
# The String value associated with this key. While you can use helper methods
# like Response#version, the field method is helpful if the Provider returns
# non-standard values that conflict with Ruby methods.
#
# For example, if the Provider returns a "clone" value of "true":
# # The following calls the Object#clone method
# @response.clone #=> # 'true'
def field(key)
@fields[key.to_s].to_s
end
# Returns true if this is an oEmbed video response.
def video?
is_a?(OEmbed::Response::Video)
end
# Returns true if this is an oEmbed photo response.
def photo?
is_a?(OEmbed::Response::Photo)
end
# Returns true if this is an oEmbed link response.
def link?
is_a?(OEmbed::Response::Link)
end
# Returns true if this is an oEmbed rich response.
def rich?
is_a?(OEmbed::Response::Rich)
end
private
# An Array of helper methods names define_methods! must be able to override
# when is's called. In general, define_methods! tries its best _not_ to override
# existing methods, so this Array is important if some other library has
# defined a method that uses an oEmbed name. For example: Object#version
def must_override
%w{
type version
title author_name author_url provider_name provider_url
cache_age thumbnail_url thumbnail_width thumbnail_height
}
end
def define_methods!
@fields.keys.each do |key|
next if self.respond_to?(key) && !must_override.include?(key.to_s)
class << self
self
end.send(:define_method, key) do
field(key)
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/http_helper.rb 0000644 0000041 0000041 00000004737 14740472417 020734 0 ustar www-data www-data require 'openssl'
module OEmbed
module HttpHelper
private
# Given a URI, make an HTTP request
#
# The options Hash recognizes the following keys:
# :timeout:: specifies the timeout (in seconds) for the http request.
# :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
def http_get(uri, options = {})
found = false
remaining_redirects = options[:max_redirects] ? options[:max_redirects].to_i : 4
scheme, host, port = uri.scheme, uri.host, uri.port
until found
http = Net::HTTP.new(host, port)
http.use_ssl = scheme == 'https'
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.read_timeout = http.open_timeout = options[:timeout] if options[:timeout]
methods = if RUBY_VERSION < "2.2"
%w{scheme userinfo host port registry}
else
%w{scheme userinfo host port}
end
methods.each { |method| uri.send("#{method}=", nil) }
req = Net::HTTP::Get.new(uri.to_s)
req['User-Agent'] = "Mozilla/5.0 (compatible; ruby-oembed/#{OEmbed::VERSION})"
res = http.request(req)
if remaining_redirects == 0
found = true
elsif res.is_a?(Net::HTTPRedirection) && res.header['location']
uri = URI.parse(res.header['location'])
# If the 'location' is a relative path, keep the last scheme, host, & port.
scheme = uri.scheme || scheme
host = uri.host || host
port = uri.port || port
remaining_redirects -= 1
else
found = true
end
end
case res
when Net::HTTPNotImplemented
raise OEmbed::UnknownFormat
when Net::HTTPNotFound
raise OEmbed::NotFound, uri
when Net::HTTPSuccess
res.body
else
raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
end
rescue StandardError
# Convert known errors into OEmbed::UnknownResponse for easy catching
# up the line. This is important if given a URL that doesn't support
# OEmbed. The following are known errors:
# * Net::* errors like Net::HTTPBadResponse
# * JSON::JSONError errors like JSON::ParserError
if defined?(::JSON) && $!.is_a?(::JSON::JSONError) || $!.class.to_s =~ /\ANet::/
raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
else
raise $!
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/ 0000755 0000041 0000041 00000000000 14740472417 020061 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/formatter/xml.rb 0000644 0000041 0000041 00000002325 14740472417 021210 0 ustar www-data www-data module OEmbed
module Formatter
# Handles parsing XML values using the best available backend.
module XML
# A Array of all available backends, listed in order of preference.
DECODERS = %w(XmlSimple REXML)
class << self
include ::OEmbed::Formatter::Base
# Returns the current XML backend.
def backend
set_default_backend unless defined?(@backend)
raise OEmbed::FormatNotSupported, :xml unless defined?(@backend)
@backend
end
def set_default_backend
DECODERS.find do |name|
begin
self.backend = name
true
rescue LoadError
# Try next decoder.
false
end
end
end
private
def backend_path
'xml/backends'
end
def test_value
<<-XML
1.0
test
42
<i>Cool's</i>\n the "word"!
XML
end
end # self
end # XML
end
end ruby-oembed-0.18.1/lib/oembed/formatter/json.rb 0000644 0000041 0000041 00000002074 14740472417 021362 0 ustar www-data www-data module OEmbed
module Formatter
# Handles parsing JSON values using the best available backend.
module JSON
# A Array of all available backends, listed in order of preference.
DECODERS = %w(ActiveSupportJSON JSONGem Yaml)
class << self
include ::OEmbed::Formatter::Base
# Returns the current JSON backend.
def backend
set_default_backend unless defined?(@backend)
raise OEmbed::FormatNotSupported, :json unless defined?(@backend)
@backend
end
def set_default_backend
DECODERS.find do |name|
begin
self.backend = name
true
rescue LoadError
# Try next decoder.
false
end
end
end
private
def backend_path
'json/backends'
end
def test_value
<<-JSON
{"version":"1.0", "string":"test", "int":42,"html":"Cool's\\n the \\"word\\"\\u0021"}
JSON
end
end # self
end # JSON
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/base.rb 0000644 0000041 0000041 00000007654 14740472417 021334 0 ustar www-data www-data module OEmbed
module Formatter
# These are methods that are shared by the OEmbed::Formatter sub-classes
# (i.e. OEmbed::Formatter:JSON and OEmbed::Formatter::XML).
module Base
# Returns true if there is a valid backend. Otherwise, raises OEmbed::FormatNotSupported
def supported?
!!backend
end
# Parses a String or IO and convert it into an Object
def decode(value)
backend.decode(value)
end
# Given either a String (the name of the backend to use) or an Object (which
# must respond to the decode method), sets the current backend. Raises a LoadError
# if the given backend cannot be loaded (e.g. an invalid String name, or the
# decode method doesn't work properly).
# OEmbed::Formatter::XML.backend = 'REXML'
# OEmbed::Formatter::JSON.backend = MyCustomJsonDecoder.new
def backend=(new_backend)
new_backend_obj = case new_backend
when String
unless already_loaded?(new_backend)
load "oembed/formatter/#{backend_path}/#{new_backend.downcase}.rb"
end
self::Backends.const_get(new_backend)
else
new_backend
end
test_backend(new_backend_obj)
@backend = new_backend_obj
rescue
raise LoadError, "There was an error setting the backend: #{new_backend.inspect} - #{$!.message}"
end
# Perform a set of operations using a backend other than the current one.
# OEmbed::Formatter::XML.with_backend('XmlSimple') do
# OEmbed::Formatter::XML.decode(xml_value)
# end
def with_backend(new_backend)
old_backend, self.backend = backend, new_backend
yield
ensure
self.backend = old_backend
end
def reset_backend
@backend = nil
remove_instance_variable(:@backend)
end
private
# Makes sure the given backend can correctly parse values using the decode
# method.
def test_backend(new_backend)
raise LoadError, "The given backend must respond to the decode method: #{new_backend.inspect}" unless new_backend.respond_to?(:decode)
expected = {
"version"=>1.0,
"string"=>"test",
"int"=>42,
"html"=>"Cool's\n the \"word\"!",
}
actual = new_backend.decode(test_value)
# For the test to be true the actual output Hash should have the
# exact same list of keys _and_ the values should be the same
# if we ignoring typecasting.
if(
actual.keys.sort != expected.keys.sort ||
actual.detect { |key, value| value.to_s != expected[key].to_s }
)
msg = new_backend.decode_fail_msg rescue nil
msg ||= "The given backend failed to decode the test string correctly"
raise LoadError, "#{msg}: #{new_backend.inspect}"
end
end
def already_loaded?(new_backend)
begin
self::Backends.const_defined?(new_backend, false)
rescue ArgumentError # we're dealing with ruby < 1.9 where const_defined? only takes 1 argument, but behaves the way we want it to.
self::Backends.const_defined?(new_backend)
rescue NameError # no backends have been loaded yet
false
end
end
# Must return a String representing the sub-directory where in-library
# backend rb files live (e.g. 'json/backends')
def backend_path
raise "This method must be defined by a format-specific OEmbed::Formatter sub-class."
end
# Must return a String that when parsed by a backend returns the following ruby Hash
# {
# "version"=>1.0,
# "string"=>"test",
# "int"=>42,
# "html"=>"Cool's\n the \"word\"!",
# }
def test_value
raise "This method must be defined by a format-specific OEmbed::Formatter sub-class."
end
end # SharedMethods
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/xml/ 0000755 0000041 0000041 00000000000 14740472417 020661 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/formatter/xml/backends/ 0000755 0000041 0000041 00000000000 14740472417 022433 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/formatter/xml/backends/xmlsimple.rb 0000644 0000041 0000041 00000002111 14740472417 024765 0 ustar www-data www-data # Only allow this backend the xml-simple gem is already loaded
raise ::LoadError, "The xml-simple library isn't available. require 'xmlsimple'" unless defined?(XmlSimple)
module OEmbed
module Formatter
module XML
module Backends
# Use the xml-simple gem to parse XML values.
module XmlSimple
extend self
# Parses an XML string or IO and convert it into an object.
def decode(xml)
if !xml.respond_to?(:read)
xml = StringIO.new(xml)
end
::XmlSimple.xml_in(xml, 'ForceArray'=>false)
rescue
case $!
when parse_error
raise $!
else
raise parse_error, "Couldn't parse the given document."
end
end
def decode_fail_msg
"The version of the xml-simple library you have installed isn't parsing XML like ruby-oembed expected."
end
def parse_error
::ArgumentError
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/xml/backends/rexml.rb 0000644 0000041 0000041 00000002254 14740472417 024112 0 ustar www-data www-data # Unlike other backends, require REXML if it's not already loaded
require 'rexml/document' unless defined?(REXML)
module OEmbed
module Formatter
module XML
module Backends
# Use the REXML library, part of the standard library, to parse XML values.
module REXML
extend self
# Parses an XML string or IO and convert it into an object
def decode(xml)
if !xml.respond_to?(:read)
xml = StringIO.new(xml)
end
obj = {}
doc = ::REXML::Document.new(xml)
doc.elements[1].elements.each do |el|
obj[el.name] = el.text
end
obj
rescue
case $!
when parse_error
raise $!
else
raise parse_error, "Couldn't parse the given document."
end
end
def decode_fail_msg
"The version of the REXML library you have installed isn't parsing XML like ruby-oembed expected."
end
def parse_error
::REXML::ParseException
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/xml/backends/nokogiri.rb 0000644 0000041 0000041 00000002174 14740472417 024605 0 ustar www-data www-data # Only allow this backend the nokogiri gem is already loaded
raise ::LoadError, "The nokogiri library isn't available. require 'nokogiri'" unless defined?(Nokogiri)
module OEmbed
module Formatter
module XML
module Backends
# Use the nokogiri gem to parse XML values.
module Nokogiri
extend self
# Parses an XML string or IO and convert it into an object.
def decode(xml)
obj = {}
doc = ::Nokogiri::XML(xml) { |config| config.strict }
doc.root.elements.each do |el|
obj[el.name] = el.text
end
obj
rescue
case $!
when parse_error
raise $!
else
raise parse_error, "Couldn't parse the given document."
end
end
def decode_fail_msg
"The version of the nokogiri library you have installed isn't parsing XML like ruby-oembed expected."
end
def parse_error
::Nokogiri::XML::SyntaxError
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/json/ 0000755 0000041 0000041 00000000000 14740472417 021032 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/formatter/json/backends/ 0000755 0000041 0000041 00000000000 14740472417 022604 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/formatter/json/backends/activesupportjson.rb 0000644 0000041 0000041 00000001426 14740472417 026736 0 ustar www-data www-data # Only allow this backend if ActiveSupport::JSON is already loaded
raise LoadError, "ActiveSupport::JSON isn't available. require 'activesupport/json'" unless defined?(ActiveSupport::JSON)
module OEmbed
module Formatter
module JSON
module Backends
module ActiveSupportJSON
extend self
# Parses a JSON string or IO and convert it into an object.
def decode(json)
::ActiveSupport::JSON.decode(json)
end
def decode_fail_msg
"The version of ActiveSupport::JSON you have installed isn't parsing JSON like ruby-oembed expected."
end
def parse_error
::ActiveSupport::JSON.parse_error
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/json/backends/yaml.rb 0000644 0000041 0000041 00000005435 14740472417 024102 0 ustar www-data www-data # Unlike other backends, require YAML if it's not already loaded
require 'yaml' unless defined?(YAML)
module OEmbed
module Formatter
module JSON
module Backends
# Use the YAML library, part of the standard library, to parse JSON values that has been converted to YAML.
module Yaml
extend self
# Parses a JSON string or IO and converts it into an object.
def decode(json)
if json.respond_to?(:read)
json = json.read
end
YAML.load(convert_json_to_yaml(json))
rescue ArgumentError, Psych::SyntaxError
raise parse_error, "Invalid JSON string"
end
def decode_fail_msg
"The version of the YAML library you have installed isn't parsing JSON like ruby-oembed expected."
end
def parse_error
::StandardError
end
protected
# Ensure that ":" and "," are always followed by a space
def convert_json_to_yaml(json) #:nodoc:
require 'strscan' unless defined? ::StringScanner
scanner, quoting, marks, pos = ::StringScanner.new(json), false, [], nil
scanner.scan_until(/\{/)
while scanner.scan_until(/(\\['"]|['":,\\]|\\.)/)
case char = scanner[1]
when '"', "'"
if !quoting
quoting = char
pos = scanner.pos
elsif quoting == char
quoting = false
end
when ":",","
marks << scanner.pos - 1 unless quoting
when "\\"
scanner.skip(/\\/)
end
end
raise parse_error unless scanner.scan_until(/\}/)
if marks.empty?
raise parse_error
else
left_pos = [-1].push(*marks)
right_pos = marks << scanner.pos + scanner.rest_size
output = []
left_pos.each_with_index do |left, i|
scanner.pos = left.succ
chunk = scanner.peek(right_pos[i] - scanner.pos + 1)
chunk.gsub!(/\\([\\\/]|u[[:xdigit:]]{4})/) do
ustr = $1
if ustr.index('u') == 0
[ustr[1..-1].to_i(16)].pack("U")
elsif ustr == '\\'
'\\\\'
else
ustr
end
end
output << chunk
end
output = output * " "
output.gsub!(/\\\//, '/')
output
end
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter/json/backends/jsongem.rb 0000644 0000041 0000041 00000001412 14740472417 024571 0 ustar www-data www-data # Only allow this backend the json gem is already loaded
raise LoadError, "The json library isn't available. require 'json'" unless Object.const_defined?('JSON')
module OEmbed
module Formatter
module JSON
module Backends
module JSONGem
extend self
# Parses a JSON string or IO and convert it into an object.
def decode(json)
if json.respond_to?(:read)
json = json.read
end
::JSON.parse(json)
end
def decode_fail_msg
"The version of the json library you have installed isn't parsing JSON like ruby-oembed expected."
end
def parse_error
::JSON::ParserError
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/response/ 0000755 0000041 0000041 00000000000 14740472417 017714 5 ustar www-data www-data ruby-oembed-0.18.1/lib/oembed/response/link.rb 0000644 0000041 0000041 00000000636 14740472417 021203 0 ustar www-data www-data module OEmbed
class Response
# A fairly generic type of Response where the url of the resource is
# the original request_url.
class Link < self
# Returns the request_url
def url
request_url
end
private
# See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3]
def must_override
super
end
end
end
end ruby-oembed-0.18.1/lib/oembed/response/video.rb 0000644 0000041 0000041 00000000507 14740472417 021351 0 ustar www-data www-data module OEmbed
class Response
# A Response used for representing playable videos.
class Video < self
private
# See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3]
def must_override
%w{
html width height
} + super
end
end
end
end ruby-oembed-0.18.1/lib/oembed/response/rich.rb 0000644 0000041 0000041 00000000614 14740472417 021167 0 ustar www-data www-data module OEmbed
class Response
# A Response used for representing rich HTML content that does not fall under
# one of the other Response categories.
class Rich < self
private
# See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3]
def must_override
%w{
html width height
} + super
end
end
end
end ruby-oembed-0.18.1/lib/oembed/response/photo.rb 0000644 0000041 0000041 00000000776 14740472417 021404 0 ustar www-data www-data module OEmbed
class Response
# A Response used for representing static photos.
class Photo < self
# Returns an
tag pointing at the appropraite URL.
def html
"
"
end
private
# See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3]
def must_override
%w{
url width height
} + super
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/provider.rb 0000644 0000041 0000041 00000017443 14740472417 020246 0 ustar www-data www-data require 'cgi'
require 'oembed/http_helper'
module OEmbed
# An OEmbed::Provider has information about an individual oEmbed enpoint.
class Provider
include OEmbed::HttpHelper
# The String that is the http URI of the Provider's oEmbed endpoint.
# This URL may also contain a {{format}} portion. In actual requests to
# this Provider, this string will be replaced with a string representing
# the request format (e.g. "json").
attr_accessor :endpoint
# The name of the default format for all request to this Provider (e.g. 'json').
attr_accessor :format
# An Array of all URL schemes supported by this Provider.
attr_accessor :urls
# The human-readable name of the Provider.
#
# @deprecated *Note*: This accessor currently isn't used anywhere in the codebase.
attr_accessor :name
# @deprecated *Note*: Added in a fork of the gem, a while back. I really would like
# to get rid of it, though. --Marcos
attr_accessor :url
# Construct a new OEmbed::Provider instance, pointing at a specific oEmbed
# endpoint.
#
# The endpoint should be a String representing the http URI of the Provider's
# oEmbed endpoint. The endpoint String may also contain a {format} portion.
# In actual requests to this Provider, this string will be replaced with a String
# representing the request format (e.g. "json").
#
# The `format:` option should be the name of the default format for all request
# to this Provider (e.g. 'json'). Defaults to OEmbed::Formatter.default
#
# # @deprecated *Note*: The `positional_format` is deprecated. Please used the named argument instead.
#
# The `required_query_params:` option should be a Hash
# representing query params that will be appended to the endpoint on each request
# and the optional name of an environment variable (i.e. ENV) whose value will be used
#
# For example:
# # If requests should be sent to:
# # "http://my.service.com/oembed?format=#{OEmbed::Formatter.default}"
# @provider = OEmbed::Provider.new("http://my.service.com/oembed")
#
# # If requests should be sent to:
# # "http://my.service.com/oembed.xml"
# @xml_provider = OEmbed::Provider.new("http://my.service.com/oembed.{format}", format: :xml)
#
# # If the endpoint requires an `access_token` be specified:
# @provider_with_auth = OEmbed::Provider.new("http://my.service.com/oembed", required_query_params: { access_token: 'MY_SERVICE_ACCESS_TOKEN' })
# # You can optionally override the value from `ENV['MY_SERVICE_ACCESS_TOKEN']`
# @provider_with_auth.access_token = @my_access_token
def initialize(endpoint, positional_format = OEmbed::Formatter.default, format: nil, required_query_params: {})
endpoint_uri = URI.parse(endpoint.gsub(/[\{\}]/,'')) rescue nil
raise ArgumentError, "The given endpoint isn't a valid http(s) URI: #{endpoint.to_s}" unless endpoint_uri.is_a?(URI::HTTP)
@required_query_params = {}
required_query_params.each do |param, default_env_var|
param = param.to_sym
@required_query_params[param] = nil
set_required_query_params(param, ENV[default_env_var]) if default_env_var
# Define a getter and a setter for each required_query_param
define_singleton_method("#{param}") { @required_query_params[param] } unless respond_to?("#{param}")
define_singleton_method("#{param}=") { |val| set_required_query_params(param, val) } unless respond_to?("#{param}=")
end
required_query_params_set?(reset_cache: true)
@endpoint = endpoint
@urls = []
@format = format || positional_format
end
# Adds the given url scheme to this Provider instance.
# The url scheme can be either a String, containing wildcards specified
# with an asterisk, (see http://oembed.com/#section2.1 for details),
# or a Regexp.
#
# For example:
# @provider << "http://my.service.com/video/*"
# @provider << "http://*.service.com/photo/*/slideshow"
# @provider << %r{^http://my.service.com/((help)|(faq))/\d+[#\?].*}
def <<(url)
if !url.is_a?(Regexp)
full, scheme, domain, path = *url.match(%r{([^:]*)://?([^/?]*)(.*)})
domain = Regexp.escape(domain).gsub("\\*", "(.*?)").gsub("(.*?)\\.", "([^\\.]+\\.)?")
path = Regexp.escape(path).gsub("\\*", "(.*?)")
url = Regexp.new("^#{Regexp.escape(scheme)}://#{domain}#{path}")
end
@urls << url
end
# Given the name of a required_query_param and a value
# store that value internally, so that it can be sent along
# with requests to this provider's endpoint.
# Raises an ArgumentError if the given param is not listed with required_query_params
# during instantiation.
def set_required_query_params(param, val)
raise ArgumentError.new("This provider does NOT have a required_query_param named #{param.inspect}") unless @required_query_params.has_key?(param)
@required_query_params[param] = val.nil? ? nil : ::CGI.escape(val.to_s)
required_query_params_set?(reset_cache: true)
@required_query_params[param]
end
# Returns true if all of this provider's required_query_params have a value
def required_query_params_set?(reset_cache: false)
return @all_required_query_params_set unless reset_cache || @all_required_query_params_set.nil?
@all_required_query_params_set = !@required_query_params.values.include?(nil)
end
# Send a request to the Provider endpoint to get information about the
# given url and return the appropriate OEmbed::Response.
#
# The query parameter should be a Hash of values which will be
# sent as query parameters in this request to the Provider endpoint. The
# following special cases apply to the query Hash:
# :timeout:: specifies the timeout (in seconds) for the http request.
# :format:: overrides this Provider's default request format.
# :url:: will be ignored, replaced by the url param.
# :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
def get(url, query = {})
query[:format] ||= @format
OEmbed::Response.create_for(raw(url, query), self, url, query[:format].to_s)
end
# Determine whether the given url is supported by this Provider by matching
# against the Provider's URL schemes.
# It will always return false of a provider has required_query_params that are not set.
def include?(url)
return false unless required_query_params_set?
@urls.empty? || !!@urls.detect{ |u| u =~ url }
end
# @deprecated *Note*: This method will be made private in the future.
def build(url, query = {})
raise OEmbed::NotFound, url unless include?(url)
query.delete(:timeout)
query.delete(:max_redirects)
query = query.merge(@required_query_params)
query = query.merge({:url => ::CGI.escape(url)})
# TODO: move this code exclusively into the get method, once build is private.
this_format = (query[:format] ||= @format.to_s).to_s
endpoint = @endpoint.clone
if endpoint.include?("{format}")
endpoint["{format}"] = this_format
query.delete(:format)
end
base = endpoint.include?('?') ? '&' : '?'
query = base + query.inject("") do |memo, (key, value)|
"#{key}=#{value}{memo}"
end.chop
URI.parse(endpoint + query).instance_eval do
@format = this_format
def format
@format
end
self
end
end
# @deprecated *Note*: This method will be made private in the future.
def raw(url, query = {})
uri = build(url, query)
http_get(uri, query)
rescue OEmbed::UnknownFormat
# raise with format to be backward compatible
raise OEmbed::UnknownFormat, format
end
end
end
ruby-oembed-0.18.1/lib/oembed/version.rb 0000644 0000041 0000041 00000000510 14740472417 020064 0 ustar www-data www-data module OEmbed
class Version
MAJOR = 0
MINOR = 18
PATCH = 1
STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
class << self
# A String representing the current version of the OEmbed gem.
def inspect
STRING
end
alias_method :to_s, :inspect
end
end
VERSION = Version::STRING
end
ruby-oembed-0.18.1/lib/oembed/errors.rb 0000644 0000041 0000041 00000002306 14740472417 017720 0 ustar www-data www-data module OEmbed
# A generic OEmbed-related Error. The OEmbed library does its best to capture all internal
# errors and wrap them in an OEmbed::Error class so that the error-handling code in your
# application can more easily identify the source of errors.
#
# The following Classes inherit from OEmbed::Error
# * OEmbed::FormatNotSupported
# * OEmbed::NotFound
# * OEmbed::ParseError
# * OEmbed::UnknownFormat
# * OEmbed::UnknownResponse
class Error < StandardError
end
# This is a test
class NotFound < OEmbed::Error # :nodoc:
def to_s
"No embeddable content at '#{super}'"
end
end
class UnknownFormat < OEmbed::Error # :nodoc:
def to_s
"The provider doesn't support the '#{super}' format"
end
end
class FormatNotSupported < OEmbed::Error # :nodoc:
def to_s
"This server doesn't have the correct libraries installed to support the '#{super}' format"
end
end
class UnknownResponse < OEmbed::Error # :nodoc:
def to_s
"Got unknown response (#{super}) from server"
end
end
class ParseError < OEmbed::Error # :nodoc:
def to_s
"There was an error parsing the server response (#{super})"
end
end
end
ruby-oembed-0.18.1/lib/oembed/providers.rb 0000644 0000041 0000041 00000013765 14740472417 020434 0 ustar www-data www-data require 'rubygems'
require 'yaml'
module OEmbed
# Allows OEmbed to perform tasks across several, registered, Providers
# at once.
class Providers
class << self
@@urls = {}
@@fallback = []
@@to_register = {}
@@access_token_setters = {}
# A Hash of all url schemes, where the keys represent schemes supported by
# all registered Provider instances and values are an Array of Providers
# that support that scheme.
def urls
@@urls
end
# Given one ore more Provider instances, register their url schemes for
# future get calls.
def register(*providers)
providers.each do |provider|
provider.urls.each do |url|
@@urls[url] ||= []
@@urls[url] << provider
end
end
end
# Given one ore more Provider instances, un-register their url schemes.
# Future get calls will not use these Providers.
def unregister(*providers)
providers.each do |provider|
provider.urls.each do |url|
if @@urls[url].is_a?(Array)
@@urls[url].delete(provider)
@@urls.delete(url) if @@urls[url].empty?
end
end
end
end
# Register all Providers built into this gem.
# The including_sub_type parameter should be one of the following values:
# * :aggregators: also register provider aggregator endpoints, like Embedly
# The access_tokens keys can be one of the following:
# * :facebook: See https://developers.facebook.com/docs/instagram/oembed#access-tokens
def register_all(*including_sub_type, access_tokens: {})
register(*@@to_register[""])
including_sub_type.each do |sub_type|
register(*@@to_register[sub_type.to_s])
end
set_access_tokens(access_tokens)
end
# Unregister all currently-registered Provider instances.
def unregister_all
@@urls = {}
@@fallback = []
end
# Takes an array of Provider instances or ProviderDiscovery
# Use this method to register fallback providers.
# When the raw or get methods are called, if the URL doesn't match
# any of the registerd url patters the fallback providers
# will be called (in order) with the URL.
#
# A common example:
# OEmbed::Providers.register_fallback(OEmbed::ProviderDiscovery, OEmbed::Providers::Noembed)
def register_fallback(*providers)
@@fallback += providers
end
# Returns an array of all registerd fallback Provider instances.
def fallback
@@fallback
end
# Returns a Provider instance whose url scheme matches the given url.
# Skips any Provider with missing required_query_params.
def find(url)
@@urls.keys.each do |url_regexp|
next unless url_regexp.match?(url)
matching_provider = @@urls[url_regexp].detect { |p| p.include?(url) }
# If we've found a matching provider, return it right away!
return matching_provider if matching_provider
end
nil
end
# Finds the appropriate Provider for this url and return the raw response.
# @deprecated *Note*: This method will be made private in the future.
def raw(url, options = {})
provider = find(url)
if provider
provider.raw(url, options)
else
fallback.each do |p|
return p.raw(url, options) rescue OEmbed::Error
end
raise(OEmbed::NotFound)
end
end
# Finds the appropriate Provider for this url and returns an OEmbed::Response,
# using Provider#get.
def get(url, options = {})
provider = find(url)
if provider
provider.get(url, options)
else
fallback.each do |p|
return p.get(url, options) rescue OEmbed::Error
end
raise(OEmbed::NotFound)
end
end
private
# Takes an OEmbed::Provider instance and registers it so that when we call
# the register_all method, they all register.
# The sub_type can be be any value
# used to uniquely group providers. Official sub_types are:
# * nil: a normal provider
# * :aggregators: an endpoint for an OEmbed aggregator
# :access_token takes a Hash with the following required keys:
# * :name: A Symbol: the name of access token, to be used with `register_all`
# * :method: A Symbol: the name of the required_query_params for the access token.
def add_official_provider(provider_class, sub_type=nil, access_token: nil)
raise TypeError, "Expected OEmbed::Provider instance but was #{provider_class.class}" \
unless provider_class.is_a?(OEmbed::Provider)
@@to_register[sub_type.to_s] ||= []
@@to_register[sub_type.to_s] << provider_class
if access_token.is_a?(Hash) && access_token[:name] && access_token[:method]
setter_method = "#{access_token[:method]}="
raise TypeError, "Expected OEmbed::Provider instance to respond to the given access_token method #{setter_method}" \
unless provider_class.respond_to?(setter_method)
@@access_token_setters[access_token[:name]] ||= []
@@access_token_setters[access_token[:name]] << provider_class.method(setter_method)
end
end
# Takes a Hash of tokens, and calls the setter method
# for all providers that use the given tokens.
# Also supports "OEMBED_*_TOKEN" environment variables.
# Currently supported tokens:
# * facebook: See https://developers.facebook.com/docs/instagram/oembed#access-tokens
def set_access_tokens(access_tokens)
access_tokens.each do |token_name, token_value|
token_name = token_name.to_sym
next unless @@access_token_setters.has_key?(token_name)
@@access_token_setters[token_name].each do |token_setter_method|
token_setter_method.call(token_value)
end
end
end
end
end
end
ruby-oembed-0.18.1/lib/oembed/formatter.rb 0000644 0000041 0000041 00000006330 14740472417 020410 0 ustar www-data www-data require 'oembed/formatter/base'
require 'oembed/formatter/json'
require 'oembed/formatter/xml'
module OEmbed
# Takes the raw response from an oEmbed server and turns it into a nice Hash of data.
module Formatter
class << self
# Returns the default format for OEmbed::Provider requests as a String.
def default
# Listed in order of preference.
%w{json xml}.detect { |type| supported?(type) rescue false }
end
# Given the name of a format we want to know about (e.g. 'json'), returns
# true if there is a valid backend. If there is no backend, raises
# OEmbed::FormatNotSupported.
def supported?(format)
case format.to_s
when 'json'
JSON.supported?
when 'xml'
XML.supported?
else
raise OEmbed::FormatNotSupported, format
end
end
# Convert the given value into a nice Hash of values. The format should
# be the name of the response format (e.g. 'json'). The value should be
# a String or IO containing the response from an oEmbed server.
#
# For example:
# value = '{"version": "1.0", "type": "link", "title": "Some Cool News Article"}'
# OEmbed::Formatter.decode('json', value)
# #=> {"version": "1.0", "type": "link", "title": "Some Cool News Article"}
def decode(format, value)
supported?(format)
begin
case format.to_s
when 'json'
begin
JSON.decode(value)
rescue JSON.backend.parse_error
raise OEmbed::ParseError, $!.message
end
when 'xml'
begin
XML.decode(value)
rescue XML.backend.parse_error
raise OEmbed::ParseError, $!.message
end
end
rescue
raise OEmbed::ParseError, "#{$!.class}: #{$!.message}"
end
end
# Test the given backend to make sure it parses known values correctly.
# The backend_module should be either a JSON or XML backend.
def test_backend(backend_module)
expected = {
"version"=>1.0,
"string"=>"test",
"int"=>42,
"html"=>"Cool's\n the \"word\"!",
}
given_value = case backend_module.to_s
when /OEmbed::Formatter::JSON::Backends::/
<<-JSON
{"version":"1.0", "string":"test", "int":42,"html":"Cool's\\n the \\"word\\"\\u0021"}
JSON
when /OEmbed::Formatter::XML::Backends::/
<<-XML
1.0
test
42
<i>Cool's</i>\n the "word"!
XML
else
nil
end
actual = backend_module.decode(given_value)
# For the test to be true the actual output Hash should have the
# exact same list of keys _and_ the values should be the same
# if we ignoring typecasting.
actual.keys.sort == expected.keys.sort &&
!actual.detect { |key, value| value.to_s != expected[key].to_s }
end
end # self
end
end
ruby-oembed-0.18.1/.yardopts 0000644 0000041 0000041 00000000127 14740472417 015723 0 ustar www-data www-data --readme README.rdoc
--markup rdoc
--exclude tasks
lib/**/*.rb - CHANGELOG.rdoc LICENSE ruby-oembed-0.18.1/Rakefile 0000644 0000041 0000041 00000000362 14740472417 015523 0 ustar www-data www-data begin
require "bundler/gem_tasks"
rescue LoadError
puts "Bundler not available. Install it with: gem install bundler"
end
load 'vcr/tasks/vcr.rake'
Dir[File.join(File.dirname(__FILE__), "lib/tasks/*.rake")].sort.each { |ext| load ext }
ruby-oembed-0.18.1/CHANGELOG.rdoc 0000644 0000041 0000041 00000025366 14740472417 016231 0 ustar www-data www-data = CHANGELOG
== Unreleased (0.18.2)
== 0.18.1 - 25 November 2024
* Fix the built-in Spotify provider; Pull #95 & #92 (Lewis Buckley)
* Update the built-in Spotify provider to use a new API endpoint; Pull #95 (Marcos Wright-Kuhns)
== 0.18.0 - 31 August 2024
* Add support for `x.com` URLs to `OEmbed::Providers::Twitter`; Pull #97 (Maxime)
* Refresh a few test casettes; Pull #96 (Marcos Wright-Kuhns)
== 0.17.0 - 25 February 2024
* Add a built-in Matterport provider; Pull #93 (Nathan Papes)
* Updated tests to run with Ruby 2.6, 3.0, & 3.2
* Switched to using GitHub Actions for CI instead of Travis CI
== 0.16.1 - 13 January 2022
* Fix the "already initialized constant OEmbed::Providers::TikTok" warning; Pull #84 (Christopher Nelson)
== 0.16.0 - 8 January 2022
* Add a built-in TikTok provider.
* Reduce gem size by excluding test files; Pull #81 (fauno)
== 0.15.0 - 1 January 2021
* *DEPRECATION* When creating an `OEmbed::Provider` instance, specifying the format via positional argument is now deprecated. Please use a named argument instead: `OEmbed::Provider.new(@endpoint_url, format: :json)`
* *DEPRECATION* Do not use the `new` method for `Instagram`, `FacebookPost`, or `FacebookVideo` providers to set your access token. Instead either use the `OEMBED_FACEBOOK_TOKEN` environment variable or call `Instagram.access_token = @your_token`.
* Fix Issue #77: Built-in Instagram & Facebook providers are now instances again.
* Add support for `OEmbed::Provider` instances with `required_query_params` (like access tokens), where the provider will fail to answer until it is fully configured.
* Add support for Instgram Reels URLs to the built-in OEmbed::Providers::Instagram.
* Support focused rspec tests for local development (e.g. "fcontext" or "fit")
* Fix a few typos in documentation & tests; Pull #76 (Inge Jørgensen)
== 0.14.1 - 28 December 2020
* Fix the YouTube provider when given a private video; Issue #79 (Sebastian Schulze)
== 0.14.0 - 5 November 2020
* *BREAKING* Built-in providers for Instagram & Facebook are now classes, not instances, and therefore can't manually be registered via `OEmbed::Providers.register(OEmbed::Providers::Instagram)`; See Issue #77
* Add support for Facebook/Instagram access tokens; Pull #75 (Inge Jørgensen)
== 0.13.1 - 25 May 2020
* Update built-in Instagram provider to support Instgram TV URLs; Pull #72 (github.com/Alexey1100)
== 0.13.0 - 3 April 2020
* *BREAKING* Remove support for very old versions of Rubygems (older than 1.2.0 which was released in 2008)
* *DEPRECATION* Remove CI testing for EOLed Ruby versions; now only testing on Ruby 2.4.1 and newer
* Updated the list of {Embedly}[https://embed.ly/] and {Noembed}[https://noembed.com/] URL schemes.
A *huge* thank you to {Ian Ker-Seymer}[https://github.com/ianks] for his recent PR that implemented _all_ of the above improvements!
== 0.12.0 - 26 March 2017
* Add a Noembed aggregator; Issue #32 (github.com/evaryont and Arnaud Leymet)
* Updated the list of {Embedly}[http://embed.ly] URL schemes.
* Remove the `rake oembed:update_oohembed` task.
== 0.11.0 - 26 March 2017
* Add built-in Speaker Deck provider; Issue #67 (Camille Roux)
* Add built-in Giphy provider
* Add built-in Kickstarter provider
* Add built-in TED provider
* Add built-in CodePen provider
* Update built-in Hulu provider to support https
== 0.10.1 - 21 May 2016
* Update built-in Twitter provider to use the new Twitter oEmbed endpoint; Pull #60 (Ben Ramsey)
* Update built-in SlideShare provider to accept https URLs and URLs from various subdomains; Pull #59 (Axel Wahlen)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
== 0.10.0 - 6 March 2016
* Add built-in Tumblr provider; Pull #55 (unknown)
* Add bulit-in FacebookPost and FacebookVideo providers; Pull #54 (John Crowe)
* Change ProviderDiscovery.discover_provider to better find tags on some sites; Issue #56 + Pull #57 (Marcos Wright-Kuhns)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
== 0.9.0 - 12 December 2015
* Add support for HTTP redirects in ProviderDiscovery; Pull #39 (Sebastian de Castelberg) and Pull #38 (Sven Schwyn)
* Add support for a :max_redirects option to Provider#get and ProviderDiscovery#get (Marcos Wright-Kuhns)
* Change built-in YouTube, Slideshare, Yfrog, Scribd, & SoundCloud providers to use the https oembed endpoint; Pull #48 (Javan Makhmali)
* Change built-in Instagram provider to recognize URLs in the www subdomain; Pull #52 (Javan Makhmali)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
== 0.8.14 - 25 April 2015
* Change built-in Vimeo provider to use https oembed endpoint; Pull #44 (Jonne Haß)
* Change built-in Flickr provider to use https oembed endpoint; Pull #46 (Javan Makhmali)
* Change built-in Flickr provider to recognize https URLs and short flic.kr URLs (Javan Makhmali & Marcos Wright-Kuhns)
== 0.8.13 - 23 April 2015
* Change built-in Instagram provider to recognize https URLs; Pull #35 (Philipp Bosch)
* Change built-in Instagram provider to use https oembed/API endpoint. (Marcos Wright-Kuhns)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
== 0.8.12 - 7 January 2015
* Fix URI error in Ruby 2.2; Pull #41, Issue #43 (Maxim Bublis)
* Change built-in YouTube provider to return https embeds; Pull #34, Issue #33 (Fla)
* Add built-in providers for Twitter, Vine, & Imgur; Pull #42 (Eliot Shepard)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
== 0.8.11 - 7 November 2014
* Add built-in provider for Spotify; Pull #36 (Sami Kukkonen)
* Update Travis CI configuration to test with modern Rails; Pull #37 (Sami Kukkonen)
== 0.8.10 - 6 August 2014
* Add support for specifying a Provider#get `:timeout`; Pull #35 (Blake Thomson)
* Upgrade to RSpec 3.x
== 0.8.9 - 15 September 2013
* SoundCloud provider supports https URLs; Pull #30 (Greg Tangey)
* Address rspec DEPRECATION warnings; Pull metavida#3 (Marcos Wright Kuhns)
== 0.8.8 - 18 November 2012
* OEmbed::Response::Photo#html now includes alt attribute; Pull #23 & #25 (François de Metz)
* Always escape the url query param when requesting a resource from a provider; Pull #26 (Michael Cohen)
* Allow query params in a provider endpoint URL; Pull #27 (Michael Andrews)
* Added built-in provider for Skitch; Pull #24 (François de Metz)
* Updated built-in Vimeo provider (Marcos Wright Kuhns)
* For developers who work on this gem, removed the dependency on jeweler (Marcos Wright Kuhns)
== 0.8.7 - 11 March 2012
* Support for https provider endpoints; Issue #16 (Marcos Wright Kuhns)
* OEmbed::Providers.register_all now actually registers all bundled providers; Issue #18 (Marcos Wright Kuhns)
* Added built-in provider for SoundCloud (Hendrik Mans)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns)
* For developers who work on this gem, the rvmrc now automatically creates an oembed gemset; Issue #20 (Florian Staudacher)
== 0.8.5 - 14 November 2011
* Fixed problems ProviderDiscovery and some xml endpoints. Also added much better test coverage. (Marcos Wright Kuhns)
* Added support for XML parsing using {Nokogiri}[http://nokogiri.org/] (Marcos Wright Kuhns)
* Added built-in provider for MLG.TV (Matt Wilson)
* Added https support to the built-in YouTube provider (Marcos Wright Kuhns)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns)
== 0.8.3 - 26 June 2011
* Fixing a circular dependency introduced during my recent Jeweler upgrade. (Marcos Wright Kuhns)
== 0.8.2 - 25 June 2011
* Added built-in providers for Instagram, Slideshare and Yfrog (Florian Günther)
* Improved support (and error detection) for custom OEmbed::Formatter backends. (Marcos Wright Kuhns)
* DRYed up OEmbed::Formatter::JSON and XML methods into OEmbed::Formatter::Base (Marcos Wright Kuhns)
* More consistently raise an OEmbed::Parse error if there is any sort of problem parsing the server response, whether it's an expected error type or not. (Marcos Wright Kuhns)
* Added in-code comments about the {OohEmbed}[http://oohembed.com] service becoming part of {Embedly}[http://embed.ly] (Marcos Wright Kuhns)
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns)
== 0.8.1 - 27 February 2011
* Removed all dependencies on external gems. XML is parsed using REXML and JSON can be parsed using YAML thanks to the convert_json_to_yaml method borrowed from Rails! (Marcos Wright Kuhns)
* Fixed several errors that cropped up when the json gem wasn't installed. (Marcos Wright Kuhns)
* OEmbed::Response#field now always return Strings. Previously, some JSON values were parsed into other Object types, like Integer and Float instances.
* OEmbed::Response#url has been renamed OEmbed::Response#request_url because OEmbed::Response::Photo#url should be the URL of the static photo to be used by the oEmbed consumer.
* OEmbed::Response.create_for now requires the format parameter.
* OEmbed::Formatter backends won't try to load gems that haven't already been loaded. (Marcos Wright Kuhns)
* Better code documentation, all around. (Marcos Wright Kuhns)
=== Deprecations & Removals
* Removed the OEmbed::Response::METHODS constant.
* OEmbed::Provders::Pownce has been removed since pownce.com is no longer active.
* Provider#url and Provider#name will be removed at some point in the future.
* All direct raw calls will be made private at some point in the future (i.e. Provider#raw, Providers#raw, and ProviderDiscovery#raw)
== 0.8.0 - Not Publicly Released
* Added OEmbed::Formatter Backends, to remove the dependency on the json gem and make adding support for other parsing libraries easier. This also fixes GitHub Issue =1. (Marcos Wright Kuhns)
* Catch invalid endpoint URLs on OEmbed::Provider instantiation. (Marcos Wright Kuhns)
* Jeweler uses the new OEmbed::Version Class. (Marcos Wright Kuhns)
* Corrected syntax for Youtube provider in the README (Ryan Richards)
* Removed the deprecated rails/init.rb file. (Marcos Wright Kuhns)
== 0.7.6 - 11 October 2010
* Released all recent changes to judofyr/master on GitHub. (Marcos Wright Kuhns)
* Added CHANGELOG & LICENSE information. (Marcos Wright Kuhns)
== 0.7.5 - 29 September 2010
* Updated the list of {Embedly}[http://embed.ly] URL schemes. (Aris Bartee)
* {rvmrc file}[http://rvm.beginrescueend.com/workflow/rvmrc/] added. (Aris Bartee)
== 0.7.0 - 23 August 2010
* Gemified. (Aris Bartee)
* Added the {Embedly}[http://embed.ly] Provider. (Alex Kessinger)
* OEmbed::Response now includes the original request url. (Colin Shea)
* Unregistering providers with duplicate URL patterns works. (Marcos Wright Kuhns)
== 0.0.0 - May 2008 - July 2010
* Initial work & release as a library (Magnus Holm, et al.)
* Many Providers supported, including {OohEmbed}[http://oohembed.com].
* Support for JSON (via the json gem) and XML (via the xml-simple gem).
ruby-oembed-0.18.1/Gemfile 0000644 0000041 0000041 00000000366 14740472417 015355 0 ustar www-data www-data source "https://rubygems.org"
gem 'bundler'
gemspec
gem 'coveralls', require: false
group :test do
gem 'rake'
gem 'rspec'
gem 'vcr'#, '1.11.3'
gem 'webmock'#, '1.3.0'
end
group :guard do
gem 'guard-rspec'
gem 'guard-bundler'
end
ruby-oembed-0.18.1/LICENSE 0000644 0000041 0000041 00000002046 14740472417 015064 0 ustar www-data www-data Copyright (c) 2010 Magnus Holm, et al.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. ruby-oembed-0.18.1/README.md 0000644 0000041 0000041 00000013062 14740472417 015336 0 ustar www-data www-data # ruby-oembed
[](https://rubygems.org/gems/ruby-oembed)
[](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml)
[](https://codeclimate.com/github/ruby-oembed/ruby-oembed)
[](https://coveralls.io/github/ruby-oembed/ruby-oembed?branch=coveralls)

An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See [oembed.com](http://oembed.com) for more about the protocol.
# Installation
gem install ruby-oembed
# Get Started
## Built-in Providers
The easiest way to use this library is to make use of the built-in providers.
```ruby
OEmbed::Providers.register_all
resource = OEmbed::Providers.get('http://www.youtube.com/watch?v=2BYXBC8WQ5k')
resource.video? #=> true
resource.thumbnail_url #=> "http://i3.ytimg.com/vi/2BYXBC8WQ5k/hqdefault.jpg"
resource.html #=> <<-HTML
HTML
```
### Providers requiring an access token
Some built-in providers require authorization in order to work. These providers won't be registered unless an access token is provided. You can either pass access tokens to the `register_app` method.
```ruby
OEmbed::Providers.register_all(access_tokens: { facebook: @my_facebook_token })
```
Or you can provide access tokens via environment variable
```ruby
ENV['OEMBED_FACEBOOK_TOKEN'] #=> 'my-access-token'
OEmbed::Providers.register_all
```
#### Currently supported access tokens
| access_token | environment variable | Associated Providers |
|--------------|-------------------------|----------------------|
| `:facebook` | `OEMBED_FACEBOOK_TOKEN` | `FacebookPost`, `FacebookVideo`, `Instagram` |
## Custom Providers
If you'd like to use a provider that isn't included in the library, it's easy to create one. Just provide the oEmbed API endpoint and URL scheme(s).
```ruby
my_provider = OEmbed::Provider.new("http://my.cool-service.com/api/oembed_endpoint.{format}")
my_provider << "http://*.cool-service.com/image/*"
my_provider << "http://*.cool-service.com/video/*"
```
You can then use your new custom provider *or* you can register it along with the rest of the built-in providers.
```ruby
resource = my_provider.get("http://a.cool-service.com/video/1") #=> OEmbed::Response
resource.provider.name #=> "My Cool Service"
OEmbed::Providers.register(my_provider)
resource = OEmbed::Providers.get("http://a.cool-service.com/video/2") #=> OEmbed::Response
```
## Fallback Providers
Last but not least, ruby-oembed supports [Noembed](https://noembed.com/), [Embedly](http://embed.ly), provider discovery. The first two are provider aggregators. Each supports a wide array of websites ranging from [Amazon.com](http://www.amazon.com) to [xkcd](http://www.xkcd.com). The later is part of the oEmbed specification that allows websites to advertise support for the oEmbed protocol.
```ruby
OEmbed::Providers.register_fallback(
OEmbed::ProviderDiscovery,
OEmbed::Providers::Noembed
)
OEmbed::Providers.get('https://www.xkcd.com/802/') #=> OEmbed::Response
```
## Formatters
This library works wonderfully on its own, but can get a speed boost by using 3rd party libraries to parse oEmbed data. To use a 3rd party Formatter, just be sure to require the library _before_ ruby-oembed (or include them in your Gemfile before ruby-oembed).
```ruby
require 'json'
require 'xmlsimple'
require 'oembed'
OEmbed::Formatter::JSON.backend #=> OEmbed::Formatter::JSON::Backends::JSONGem
OEmbed::Formatter::XML.backend #=> OEmbed::Formatter::XML::Backends::XmlSimple
```
The following, optional, backends are currently supported:
* The [JSON implementation for Ruby](http://flori.github.com/json/)
* Rails' ActiveSupport::JSON (confirmed to work with Rails 3.0.x and should work with Rails 2.0+)
* [XmlSimple](http://xml-simple.rubyforge.org/)
# Lend a Hand
Code for the ruby-oembed library is [hosted on GitHub](https://github.com/ruby-oembed/ruby-oembed).
```bash
# Get the code.
git clone git://github.com/ruby-oembed/ruby-oembed.git
cd ruby-oembed
# Install all development-related gems.
gem install bundler
bundle install
# Run the tests.
bundle exec rake
# or run the test continually
bundle exec guard
```
If you encounter any bug, feel free to [create an Issue](https://github.com/ruby-oembed/ruby-oembed/issues).
We gladly accept pull requests! Just [fork](http://help.github.com/forking/) the library and commit your changes along with relevant tests. Once you're happy with the changes, [send a pull request](http://help.github.com/pull-requests/).
We do our best to [keep our tests green](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml)
# Contributors
Thanks to [all who have made contributions](https://github.com/ruby-oembed/ruby-oembed/contributors) to this gem, both large and small.
# License
This code is free to use under the terms of the MIT license.