ruby-oembed 0.8.14 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f272f1578d7a957040f57d7be37efd0d5f3d0c38
4
- data.tar.gz: aa9c139bd3f26aeafd8a591331a0e3c3ba8160ea
3
+ metadata.gz: 7678131f1e0f05d6cb7a47c34fc92965fbfafb93
4
+ data.tar.gz: a1c6ccaca29f4f001027eb6e51c1ca6016fafaac
5
5
  SHA512:
6
- metadata.gz: d0793e3de5c2a4ffc40c75cefceab7890bf6ab43b24cd8e5f9da7ac37f8732074170f80cf384d63e7f656a391e526f254d06535c3aec4d5456c60b7a3c36bf3b
7
- data.tar.gz: 25b144a3c8c6682ae9e1d5c99a1cede9cf8013ce9cbc83e05b50f0401eca8e11ad1bfab7e986cef2a08cca2cf5c49ad3d83ae98f849f17525bb1d9d2d802ab7a
6
+ metadata.gz: 50f755636f113f3b8c05beffceb1de302ee3285b6b353a5d2d62577984372d3fc99844aabc4a89176aed9c919a0bbaf7c6c32c9b4ad78948c512d6f97e4e6a8f
7
+ data.tar.gz: 950b05436f26c660fd0d0978e8c9883625859b6e9f7c6cb977599c33cf8ced1b064f36ca4057ece5e7d31fb41e67e7dd3e6eae13532a2593bee919997a878216
data/.gitignore CHANGED
@@ -5,3 +5,6 @@
5
5
  Gemfile.lock
6
6
  .yardoc
7
7
  .DS_Store
8
+ /.rvm
9
+ /.ruby-version
10
+ /.ruby-gemset
data/.travis.yml CHANGED
@@ -1,4 +1,6 @@
1
1
  language: ruby
2
+ before_install:
3
+ - gem install bundler --version="~> 1.10"
2
4
  cache: bundler
3
5
  rvm:
4
6
  - 1.9.3
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,13 @@
1
1
  = CHANGELOG
2
2
 
3
+ == 0.9.0 - 12 December 2015
4
+
5
+ * Add support for HTTP redirects in ProviderDiscovery; Pull #39 (Sebastian de Castelberg) and Pull #38 (Sven Schwyn)
6
+ * Add support for a :max_redirects option to Provider#get and ProviderDiscovery#get (Marcos Wright-Kuhns)
7
+ * Change built-in YouTube, Slideshare, Yfrog, Scribd, & SoundCloud providers to use the https oembed endpoint; Pull #48 (Javan Makhmali)
8
+ * Change built-in Instagram provider to recognize URLs in the www subdomain; Pull #52 (Javan Makhmali)
9
+ * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
10
+
3
11
  == 0.8.14 - 25 April 2015
4
12
 
5
13
  * Change built-in Vimeo provider to use https oembed endpoint; Pull #44 (Jonne Haß)
data/Gemfile CHANGED
@@ -1,3 +1,11 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ # Travis CI was running into several bundler-related bug
4
+ # * https://github.com/bundler/bundler/pull/3559
5
+ # * https://github.com/bundler/bundler/issues/3560
6
+ # that only apply to older versions of Bundler.
7
+ # I added this requirement so that future Travis CI builds
8
+ # fail quickly if an old version of bundler is being used.
9
+ gem 'bundler', '~>1.10'
10
+
3
11
  gemspec
@@ -0,0 +1,64 @@
1
+ module OEmbed
2
+ module HttpHelper
3
+
4
+ private
5
+
6
+ # Given a URI, make an HTTP request
7
+ #
8
+ # The options Hash recognizes the following keys:
9
+ # :timeout:: specifies the timeout (in seconds) for the http request.
10
+ # :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
11
+ def http_get(uri, options = {})
12
+ found = false
13
+ remaining_redirects = options[:max_redirects] ? options[:max_redirects].to_i : 4
14
+ until found
15
+ http = Net::HTTP.new(uri.host, uri.port)
16
+ http.use_ssl = uri.scheme == 'https'
17
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
18
+ http.read_timeout = http.open_timeout = options[:timeout] if options[:timeout]
19
+
20
+ methods = if RUBY_VERSION < "2.2"
21
+ %w{scheme userinfo host port registry}
22
+ else
23
+ %w{scheme userinfo host port}
24
+ end
25
+ methods.each { |method| uri.send("#{method}=", nil) }
26
+ req = Net::HTTP::Get.new(uri.to_s)
27
+ req['User-Agent'] = "Mozilla/5.0 (compatible; ruby-oembed/#{OEmbed::VERSION})"
28
+ res = http.request(req)
29
+
30
+ if remaining_redirects == 0
31
+ found = true
32
+ elsif res.is_a?(Net::HTTPRedirection) && res.header['location']
33
+ uri = URI.parse(res.header['location'])
34
+ remaining_redirects -= 1
35
+ else
36
+ found = true
37
+ end
38
+ end
39
+
40
+ case res
41
+ when Net::HTTPNotImplemented
42
+ raise OEmbed::UnknownFormat
43
+ when Net::HTTPNotFound
44
+ raise OEmbed::NotFound, uri
45
+ when Net::HTTPSuccess
46
+ res.body
47
+ else
48
+ raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
49
+ end
50
+ rescue StandardError
51
+ # Convert known errors into OEmbed::UnknownResponse for easy catching
52
+ # up the line. This is important if given a URL that doesn't support
53
+ # OEmbed. The following are known errors:
54
+ # * Net::* errors like Net::HTTPBadResponse
55
+ # * JSON::JSONError errors like JSON::ParserError
56
+ if defined?(::JSON) && $!.is_a?(::JSON::JSONError) || $!.class.to_s =~ /\ANet::/
57
+ raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
58
+ else
59
+ raise $!
60
+ end
61
+ end
62
+
63
+ end
64
+ end
@@ -1,33 +1,36 @@
1
1
  require 'cgi'
2
+ require 'oembed/http_helper'
3
+
2
4
  module OEmbed
3
5
  # An OEmbed::Provider has information about an individual oEmbed enpoint.
4
6
  class Provider
5
-
7
+ include OEmbed::HttpHelper
8
+
6
9
  # The String that is the http URI of the Provider's oEmbed endpoint.
7
10
  # This URL may also contain a {{format}} portion. In actual requests to
8
11
  # this Provider, this string will be replaced with a string representing
9
12
  # the request format (e.g. "json").
10
13
  attr_accessor :endpoint
11
-
14
+
12
15
  # The name of the default format for all request to this Provider (e.g. 'json').
13
16
  attr_accessor :format
14
-
17
+
15
18
  # An Array of all URL schemes supported by this Provider.
16
19
  attr_accessor :urls
17
-
20
+
18
21
  # The human-readable name of the Provider.
19
22
  #
20
23
  # @deprecated *Note*: This accessor currently isn't used anywhere in the codebase.
21
24
  attr_accessor :name
22
-
25
+
23
26
  # @deprecated *Note*: Added in a fork of the gem, a while back. I really would like
24
27
  # to get rid of it, though. --Marcos
25
28
  attr_accessor :url
26
-
29
+
27
30
 
28
31
  # Construct a new OEmbed::Provider instance, pointing at a specific oEmbed
29
32
  # endpoint.
30
- #
33
+ #
31
34
  # The endpoint should be a String representing the http URI of the Provider's
32
35
  # oEmbed endpoint. The endpoint String may also contain a {format} portion.
33
36
  # In actual requests to this Provider, this string will be replaced with a String
@@ -35,7 +38,7 @@ module OEmbed
35
38
  #
36
39
  # If give, the format should be the name of the default format for all request
37
40
  # to this Provider (e.g. 'json'). Defaults to OEmbed::Formatter.default
38
- #
41
+ #
39
42
  # For example:
40
43
  # # If requests should be sent to:
41
44
  # # "http://my.service.com/oembed?format=#{OEmbed::Formatter.default}"
@@ -47,7 +50,7 @@ module OEmbed
47
50
  def initialize(endpoint, format = OEmbed::Formatter.default)
48
51
  endpoint_uri = URI.parse(endpoint.gsub(/[\{\}]/,'')) rescue nil
49
52
  raise ArgumentError, "The given endpoint isn't a valid http(s) URI: #{endpoint.to_s}" unless endpoint_uri.is_a?(URI::HTTP)
50
-
53
+
51
54
  @endpoint = endpoint
52
55
  @urls = []
53
56
  @format = format
@@ -57,7 +60,7 @@ module OEmbed
57
60
  # The url scheme can be either a String, containing wildcards specified
58
61
  # with an asterisk, (see http://oembed.com/#section2.1 for details),
59
62
  # or a Regexp.
60
- #
63
+ #
61
64
  # For example:
62
65
  # @provider << "http://my.service.com/video/*"
63
66
  # @provider << "http://*.service.com/photo/*/slideshow"
@@ -81,11 +84,12 @@ module OEmbed
81
84
  # :timeout:: specifies the timeout (in seconds) for the http request.
82
85
  # :format:: overrides this Provider's default request format.
83
86
  # :url:: will be ignored, replaced by the url param.
87
+ # :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
84
88
  def get(url, query = {})
85
89
  query[:format] ||= @format
86
90
  OEmbed::Response.create_for(raw(url, query), self, url, query[:format].to_s)
87
91
  end
88
-
92
+
89
93
  # Determine whether the given url is supported by this Provider by matching
90
94
  # against the Provider's URL schemes.
91
95
  def include?(url)
@@ -98,10 +102,11 @@ module OEmbed
98
102
 
99
103
  query = query.merge({:url => ::CGI.escape(url)})
100
104
  query.delete(:timeout)
105
+ query.delete(:max_redirects)
101
106
 
102
107
  # TODO: move this code exclusively into the get method, once build is private.
103
108
  this_format = (query[:format] ||= @format.to_s).to_s
104
-
109
+
105
110
  endpoint = @endpoint.clone
106
111
 
107
112
  if endpoint.include?("{format}")
@@ -126,56 +131,10 @@ module OEmbed
126
131
  # @deprecated *Note*: This method will be made private in the future.
127
132
  def raw(url, query = {})
128
133
  uri = build(url, query)
129
-
130
- found = false
131
- max_redirects = 4
132
- until found
133
- http = Net::HTTP.new(uri.host, uri.port)
134
- http.use_ssl = uri.scheme == 'https'
135
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
136
- http.read_timeout = http.open_timeout = query[:timeout] if query[:timeout]
137
-
138
- methods = if RUBY_VERSION < "2.2"
139
- %w{scheme userinfo host port registry}
140
- else
141
- %w{scheme userinfo host port}
142
- end
143
- methods.each { |method| uri.send("#{method}=", nil) }
144
- req = Net::HTTP::Get.new(uri.to_s)
145
- req['User-Agent'] = "Mozilla/5.0 (compatible; ruby-oembed/#{OEmbed::VERSION})"
146
- res = http.request(req)
147
-
148
- #res = Net::HTTP.start(uri.host, uri.port) {|http| http.get(uri.request_uri) }
149
-
150
- res.header['location'] ? uri = URI.parse(res.header['location']) : found = true
151
- if max_redirects == 0
152
- found = true
153
- else
154
- max_redirects -= 1
155
- end
156
- end
157
-
158
- case res
159
- when Net::HTTPNotImplemented
160
- raise OEmbed::UnknownFormat, format
161
- when Net::HTTPNotFound
162
- raise OEmbed::NotFound, url
163
- when Net::HTTPSuccess
164
- res.body
165
- else
166
- raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
167
- end
168
- rescue StandardError
169
- # Convert known errors into OEmbed::UnknownResponse for easy catching
170
- # up the line. This is important if given a URL that doesn't support
171
- # OEmbed. The following are known errors:
172
- # * Net::* errors like Net::HTTPBadResponse
173
- # * JSON::JSONError errors like JSON::ParserError
174
- if defined?(::JSON) && $!.is_a?(::JSON::JSONError) || $!.class.to_s =~ /\ANet::/
175
- raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error'
176
- else
177
- raise $!
178
- end
134
+ http_get(uri, query)
135
+ rescue OEmbed::UnknownFormat
136
+ # raise with format to be backward compatible
137
+ raise OEmbed::UnknownFormat, format
179
138
  end
180
139
  end
181
140
  end
@@ -1,15 +1,19 @@
1
+ require 'oembed/http_helper'
2
+
1
3
  module OEmbed
2
4
  # Uses {oEmbed Discover}[http://oembed.com/#section4] to generate a new Provider
3
5
  # instance about a URL for which a Provider didn't previously exist.
4
6
  class ProviderDiscovery
5
7
  class << self
6
8
 
9
+ include OEmbed::HttpHelper
10
+
7
11
  # Discover the Provider for the given url, then call Provider#raw on that provider.
8
12
  # The query parameter will be passed to both discover_provider and Provider#raw
9
13
  # @deprecated *Note*: This method will be made private in the future.
10
14
  def raw(url, query={})
11
15
  provider = discover_provider(url, query)
12
- provider.raw(url, options)
16
+ provider.raw(url, query)
13
17
  end
14
18
 
15
19
  # Discover the Provider for the given url, then call Provider#get on that provider.
@@ -24,44 +28,36 @@ module OEmbed
24
28
  #
25
29
  # The options Hash recognizes the following keys:
26
30
  # :format:: If given only discover endpoints for the given format. If not format is given, use the first available format found.
31
+ # :timeout:: specifies the timeout (in seconds) for the http request.
32
+ # :max_redirects:: the number of times this request will follow 3XX redirects before throwing an error. Default: 4
27
33
  def discover_provider(url, options = {})
28
34
  uri = URI.parse(url)
29
35
 
30
- res = Net::HTTP.start(uri.host, uri.port) do |http|
31
- http.get(uri.request_uri)
36
+ res = http_get(uri, options)
37
+ format = options[:format]
38
+
39
+ if format.nil? || format == :json
40
+ provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*application\/json\+oembed.*>/.match(res)[1] rescue nil
41
+ provider_endpoint ||= /<link.*application\/json\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res)[1] rescue nil
42
+ format ||= :json if provider_endpoint
43
+ end
44
+ if format.nil? || format == :xml
45
+ # {The specification}[http://oembed.com/#section4] says XML discovery should have
46
+ # type="text/xml+oembed" but some providers use type="application/xml+oembed"
47
+ provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*(application|text)\/xml\+oembed.*>/.match(res)[1] rescue nil
48
+ provider_endpoint ||= /<link.*(application|text)\/xml\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res)[2] rescue nil
49
+ format ||= :xml if provider_endpoint
32
50
  end
33
51
 
34
- case res
35
- when Net::HTTPNotFound
52
+ begin
53
+ provider_endpoint = URI.parse(provider_endpoint)
54
+ provider_endpoint.query = nil
55
+ provider_endpoint = provider_endpoint.to_s
56
+ rescue URI::Error
36
57
  raise OEmbed::NotFound, url
37
- when Net::HTTPSuccess
38
- format = options[:format]
39
-
40
- if format.nil? || format == :json
41
- provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*application\/json\+oembed.*>/.match(res.body)[1] rescue nil
42
- provider_endpoint ||= /<link.*application\/json\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res.body)[1] rescue nil
43
- format ||= :json if provider_endpoint
44
- end
45
- if format.nil? || format == :xml
46
- # {The specification}[http://oembed.com/#section4] says XML discovery should have
47
- # type="text/xml+oembed" but some providers use type="application/xml+oembed"
48
- provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*(application|text)\/xml\+oembed.*>/.match(res.body)[1] rescue nil
49
- provider_endpoint ||= /<link.*(application|text)\/xml\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res.body)[2] rescue nil
50
- format ||= :xml if provider_endpoint
51
- end
52
-
53
- begin
54
- provider_endpoint = URI.parse(provider_endpoint)
55
- provider_endpoint.query = nil
56
- provider_endpoint = provider_endpoint.to_s
57
- rescue URI::Error
58
- raise OEmbed::NotFound, url
59
- end
60
-
61
- Provider.new(provider_endpoint, format || OEmbed::Formatter.default)
62
- else
63
- raise OEmbed::UnknownResponse, res.code
64
58
  end
59
+
60
+ Provider.new(provider_endpoint, format || OEmbed::Formatter.default)
65
61
  end
66
62
 
67
63
  end
@@ -136,7 +136,7 @@ module OEmbed
136
136
  # OEmbed::Providers::Youtube.endpoint += "?iframe=0"
137
137
  # * To require https embed code
138
138
  # OEmbed::Providers::Youtube.endpoint += "?scheme=https"
139
- Youtube = OEmbed::Provider.new("http://www.youtube.com/oembed?scheme=https")
139
+ Youtube = OEmbed::Provider.new("https://www.youtube.com/oembed?scheme=https")
140
140
  Youtube << "http://*.youtube.com/*"
141
141
  Youtube << "https://*.youtube.com/*"
142
142
  Youtube << "http://*.youtu.be/*"
@@ -199,20 +199,22 @@ module OEmbed
199
199
  Instagram = OEmbed::Provider.new("https://api.instagram.com/oembed", :json)
200
200
  Instagram << "http://instagr.am/p/*"
201
201
  Instagram << "http://instagram.com/p/*"
202
+ Instagram << "http://www.instagram.com/p/*"
202
203
  Instagram << "https://instagr.am/p/*"
203
204
  Instagram << "https://instagram.com/p/*"
205
+ Instagram << "https://www.instagram.com/p/*"
204
206
  add_official_provider(Instagram)
205
207
 
206
208
  # Provider for slideshare.net
207
209
  # http://www.slideshare.net/developers/oembed
208
- Slideshare = OEmbed::Provider.new("http://www.slideshare.net/api/oembed/2")
210
+ Slideshare = OEmbed::Provider.new("https://www.slideshare.net/api/oembed/2")
209
211
  Slideshare << "http://www.slideshare.net/*/*"
210
212
  Slideshare << "http://www.slideshare.net/mobile/*/*"
211
213
  add_official_provider(Slideshare)
212
214
 
213
215
  # Provider for yfrog
214
216
  # http://code.google.com/p/imageshackapi/wiki/OEMBEDSupport
215
- Yfrog = OEmbed::Provider.new("http://www.yfrog.com/api/oembed", :json)
217
+ Yfrog = OEmbed::Provider.new("https://www.yfrog.com/api/oembed", :json)
216
218
  Yfrog << "http://yfrog.com/*"
217
219
  add_official_provider(Yfrog)
218
220
 
@@ -258,7 +260,7 @@ module OEmbed
258
260
  add_official_provider(NFBCanada)
259
261
 
260
262
  # Provider for scribd.com
261
- Scribd = OEmbed::Provider.new("http://www.scribd.com/services/oembed")
263
+ Scribd = OEmbed::Provider.new("https://www.scribd.com/services/oembed")
262
264
  Scribd << "http://*.scribd.com/*"
263
265
  add_official_provider(Scribd)
264
266
 
@@ -274,7 +276,7 @@ module OEmbed
274
276
 
275
277
  # Provider for soundcloud.com
276
278
  # http://developers.soundcloud.com/docs/oembed
277
- SoundCloud = OEmbed::Provider.new("http://soundcloud.com/oembed", :json)
279
+ SoundCloud = OEmbed::Provider.new("https://soundcloud.com/oembed", :json)
278
280
  SoundCloud << "http://*.soundcloud.com/*"
279
281
  SoundCloud << "https://*.soundcloud.com/*"
280
282
  add_official_provider(SoundCloud)
@@ -21,8 +21,10 @@
21
21
  - http://*.deviantart.com/gallery/*
22
22
  - http://*.deviantart.net/*/*.gif
23
23
  - http://*.deviantart.net/*/*.jpg
24
+ - http://*.hosted.panopto.com/*
24
25
  - http://*.iplayerhd.com/player/video/*
25
26
  - http://*.iplayerhd.com/playerframe/*
27
+ - http://*.kaltura.com/*
26
28
  - http://*.kastio.com/webcasts/*
27
29
  - http://*.kinomap.com/*
28
30
  - http://*.linkedin.com/company/*
@@ -30,6 +32,7 @@
30
32
  - http://*.linkedin.com/pub/*
31
33
  - http://*.looplogic.com/*
32
34
  - http://*.polarb.com/*
35
+ - http://*.silk.co/explore/*
33
36
  - http://*.slideshare.net/*/*
34
37
  - http://*.smugmug.com/*
35
38
  - http://*.smugmug.com/*#*
@@ -88,6 +91,8 @@
88
91
  - http://achewood.com/*
89
92
  - http://achewood.com/index.php*
90
93
  - http://alkislarlayasiyorum.com/*
94
+ - http://alpha.vrchive.com/*
95
+ - http://alphahat.com/view/*
91
96
  - http://amzn.com/*
92
97
  - http://aniboom.com/animation-video/*
93
98
  - http://animal.discovery.com/videos/*
@@ -97,8 +102,11 @@
97
102
  - http://api.minoto-video.com/publishers/*/videos/*
98
103
  - http://api.shopstyle.com/action/apiVisitRetailer*
99
104
  - http://app.sliderocket.com/*
105
+ - http://app.stghv.com/*
100
106
  - http://app.ustudio.com/embed/*/*
107
+ - http://app.videocheckout.com/embed/*
101
108
  - http://app.wistia.com/embed/medias/*
109
+ - http://arcg.is/*
102
110
  - http://askmen.com/video/*
103
111
  - http://asofterworld.com/*.jpg
104
112
  - http://audioboom.com/boos/*
@@ -112,6 +120,7 @@
112
120
  - http://beta.polstir.com/*/*
113
121
  - http://bigthink.com/ideas/*
114
122
  - http://bigthink.com/series/*
123
+ - http://blab.im/*
115
124
  - http://blip.tv/*/*
116
125
  - http://boo.fm/b*
117
126
  - http://bop.fm/s/*/*
@@ -123,15 +132,19 @@
123
132
  - http://break.com/*/*
124
133
  - http://bubb.li/*
125
134
  - http://bunkrapp.com/*/*
135
+ - http://calameo.com/*
126
136
  - http://canalplus.fr/*
127
137
  - http://cbsnews.com/video/watch/*
128
138
  - http://chirb.it/*
129
139
  - http://cl.ly/*
130
140
  - http://cl.ly/*/content
141
+ - http://clippituser.tv/*
131
142
  - http://clipter.com/c/*
132
143
  - http://clyp.it/*
144
+ - http://cnb.cx/*
133
145
  - http://cnbc.com/id/*/play/1/video/*
134
146
  - http://cnbc.com/id/*?*video*
147
+ - http://cnn.it/*
135
148
  - http://codepen.io/*/pen/*
136
149
  - http://codepen.io/*/pen/*
137
150
  - http://codepicnic.com/bites/*
@@ -146,23 +159,26 @@
146
159
  - http://crocodoc.com/*
147
160
  - http://crowdmap.com/map/*
148
161
  - http://crowdmap.com/post/*
149
- - http://crunchbase.com/*/*
150
162
  - http://d.pr/i/*
151
163
  - http://dashboard.minoto-video.com/main/video/details/*
152
164
  - http://distrify.com/film/*
153
165
  - http://dnbradio.com/*
154
166
  - http://dotsub.com/view/*
155
167
  - http://drbl.in/*
168
+ - http://dreambroker.com/channel/*
156
169
  - http://dsc.discovery.com/videos/*
157
170
  - http://edition.cnn.com/video/*
171
+ - http://edition.cnn.com/videos/*
158
172
  - http://embed.imajize.com/*
159
173
  - http://embed.minoto-video.com/*
160
174
  - http://espn.go.com/*/story*
161
175
  - http://espn.go.com/video/clip*
162
176
  - http://etsy.com/listing/*
163
177
  - http://fav.me/*
178
+ - http://fb.com
164
179
  - http://fb.me/*
165
180
  - http://fiverr.com/*/*
181
+ - http://flat.io/score/*
166
182
  - http://flic.kr/*
167
183
  - http://flowvella.com/s/*
168
184
  - http://fora.tv/*/*/*/*
@@ -172,6 +188,7 @@
172
188
  - http://fotopedia.com/*/*
173
189
  - http://foursquare.com/*
174
190
  - http://fr.peoplbrain.com/tutoriaux/*
191
+ - http://frankly.me/*
175
192
  - http://freemusicarchive.org/curator/*
176
193
  - http://freemusicarchive.org/music/*
177
194
  - http://frontback.me/p/*
@@ -186,6 +203,7 @@
186
203
  - http://goanimate.com/videos/*
187
204
  - http://godtube.com/featured/video/*
188
205
  - http://godtube.com/watch/*
206
+ - http://google.*/maps/*
189
207
  - http://google.com/profiles/*
190
208
  - http://gph.is/*
191
209
  - http://grindtv.com/*/video/*
@@ -196,6 +214,7 @@
196
214
  - http://huffduffer.com/*/*
197
215
  - http://hulu.com/w/*
198
216
  - http://hulu.com/watch*
217
+ - http://hulu.tv/*
199
218
  - http://hypem.com/premiere/*
200
219
  - http://i*.photobucket.com/albums/*
201
220
  - http://i.giflike.com/*
@@ -215,6 +234,7 @@
215
234
  - http://investigation.discovery.com/videos/*
216
235
  - http://isnare.com/*
217
236
  - http://issuu.com/*/docs/*
237
+ - http://it.youtube.com/*
218
238
  - http://itunes.apple.com/*
219
239
  - http://izlesene.com/video/*
220
240
  - http://jdsupra.com/legalnews/*
@@ -236,6 +256,7 @@
236
256
  - http://logotv.com/video/*
237
257
  - http://lonelyplanet.com/Clip.aspx?*
238
258
  - http://lustich.de/videos/*
259
+ - http://lynda.com/*
239
260
  - http://m.youtube.com/index*
240
261
  - http://m.youtube.com/watch*
241
262
  - http://maps.google.com/?*
@@ -254,6 +275,7 @@
254
275
  - http://mlkshk.com/p/*
255
276
  - http://moby.to/*
256
277
  - http://money.cnn.com/video/*
278
+ - http://money.cnn.com/videos/*
257
279
  - http://mpora.com/videos/*
258
280
  - http://msn.foxsports.com/video*
259
281
  - http://msnbc.msn.com/*/watch/*
@@ -262,6 +284,7 @@
262
284
  - http://muzu.tv/*
263
285
  - http://my.opera.com/*/albums/show.dml?id=*
264
286
  - http://my.opera.com/*/albums/showpic.dml?album=*&picture=*
287
+ - http://my.storygami.com/video/*
265
288
  - http://myloc.me/*
266
289
  - http://mynet.com/video/*
267
290
  - http://nbcnews.com/*
@@ -272,6 +295,7 @@
272
295
  - http://on.aol.com/video/*
273
296
  - http://on.bubb.li/*
274
297
  - http://open.spotify.com/*
298
+ - http://oumy.com/v/*
275
299
  - http://ow.ly/i/*
276
300
  - http://pastebin.com/*
277
301
  - http://pastie.org/*
@@ -286,35 +310,40 @@
286
310
  - http://planetgreen.discovery.com/videos/*
287
311
  - http://play.minoto-video.com/*
288
312
  - http://play.spotify.com/*
313
+ - http://player.videopath.com/*
289
314
  - http://player.vimeo.com/*
315
+ - http://plays.tv/video/*
290
316
  - http://plus.google.com/*
291
317
  - http://polarb.com/*
292
318
  - http://polldaddy.com/community/poll/*
293
319
  - http://polldaddy.com/poll/*
320
+ - http://pollplug.com/poll/*
294
321
  - http://polstir.com/*/*
295
322
  - http://ponga.com/*
296
323
  - http://portal.sliderocket.com/*
297
324
  - http://prezi.com/*/*
298
325
  - http://public.chartblocks.com/c/*
299
326
  - http://public.talely.com/*/*
327
+ - http://publons.com/author/*
300
328
  - http://qik.com/*
301
329
  - http://qik.com/video/*
302
330
  - http://qik.ly/*
303
331
  - http://questionablecontent.net/
304
332
  - http://questionablecontent.net/comics/*.png
305
333
  - http://questionablecontent.net/view.php*
306
- - http://quora.com/*
334
+ - http://quora.com/*/answer/*
307
335
  - http://radd.it/comments/*
308
336
  - http://radd.it/magic/*
309
337
  - http://radd.it/playlists/*
310
338
  - http://radd.it/r/*
311
339
  - http://radd.it/user/*
312
- - http://radionomy.com/*/radio/*
313
340
  - http://radioreddit.com/?q=songs*
314
341
  - http://radioreddit.com/songs*
315
342
  - http://rapidengage.com/s/*
316
343
  - http://redux.com/f/*/*
317
344
  - http://redux.com/stream/item/*/*
345
+ - http://relayto.com/*
346
+ - http://reuters.com/video/*
318
347
  - http://reuters.com/video/*
319
348
  - http://s*.photobucket.com/albums/*
320
349
  - http://say.ly/*
@@ -331,11 +360,13 @@
331
360
  - http://sendables.jibjab.com/view/*
332
361
  - http://sendvid.com/*
333
362
  - http://shoplocket.com/products/*
363
+ - http://shorti.org/*
334
364
  - http://showme.com/sh/*
335
365
  - http://siteanalytics.compete.com/*
336
366
  - http://skitch.com/*/*/*
337
367
  - http://sliderocket.com/*
338
368
  - http://slidesha.re/*
369
+ - http://slidr.io/*/*
339
370
  - http://snappytv.com/*
340
371
  - http://snd.sc/*
341
372
  - http://snotr.com/video/*
@@ -353,6 +384,7 @@
353
384
  - http://sproutvideo.com/videos/*
354
385
  - http://stepic.org/*
355
386
  - http://storify.com/*/*
387
+ - http://streamable.com/*
356
388
  - http://streamio.com/api/v1/*
357
389
  - http://streetfire.net/video/*.htm*
358
390
  - http://tagmotion.com/tree/*
@@ -361,6 +393,7 @@
361
393
  - http://thedailyshow.cc.com/videos/*
362
394
  - http://theguardian.com/*/video/*/*/*/*
363
395
  - http://theonion.com/video/*
396
+ - http://ticker.tv/v/*
364
397
  - http://tinypic.com/player.php*
365
398
  - http://tinypic.com/r/*/*
366
399
  - http://tinypic.com/view.php*
@@ -396,6 +429,7 @@
396
429
  - http://video.pbs.org/video/*
397
430
  - http://video.uludagsozluk.com/*
398
431
  - http://video214.com/play/*
432
+ - http://videobio.com/playerjs/*
399
433
  - http://videodetective.com/*/*
400
434
  - http://videodonor.com/video/*
401
435
  - http://videos.nymag.com/*
@@ -409,6 +443,7 @@
409
443
  - http://vzaar.com/videos/*
410
444
  - http://vzaar.me/*
411
445
  - http://vzaar.tv/*
446
+ - http://w.graphiq.com/w/*
412
447
  - http://washingtonpost.com/wp-dyn/*/video/*/*/*/*
413
448
  - http://weavly.com/watch/*
414
449
  - http://web.tv/*
@@ -426,6 +461,7 @@
426
461
  - http://www.achewood.com/index.php*
427
462
  - http://www.alkislarlayasiyorum.com/*
428
463
  - http://www.allego.com/*
464
+ - http://www.alphahat.com/view/*
429
465
  - http://www.amzn.com/*
430
466
  - http://www.aniboom.com/animation-video/*
431
467
  - http://www.askmen.com/video/*
@@ -439,13 +475,18 @@
439
475
  - http://www.branchtrack.com/projects/*
440
476
  - http://www.bravotv.com/*/*/videos/*
441
477
  - http://www.break.com/*/*
478
+ - http://www.calameo.com/*
442
479
  - http://www.canalplus.fr/*
480
+ - http://www.candybank.com/*
443
481
  - http://www.clikthrough.com/theater/video/*
444
482
  - http://www.clipfish.de/*/*/video/*
483
+ - http://www.clippituser.tv/*
445
484
  - http://www.clipsyndicate.com/video/playlist/*/*
446
485
  - http://www.cnbc.com/id/*/play/1/video/*
447
486
  - http://www.cnbc.com/id/*?*video*
448
487
  - http://www.cnn.com/video/*
488
+ - http://www.cnn.com/videos/*
489
+ - http://www.cnn.com/videos/*
449
490
  - http://www.codeply.com/view/*
450
491
  - http://www.colbertnation.com/full-episodes/*
451
492
  - http://www.colbertnation.com/the-colbert-report-collections/*
@@ -455,15 +496,16 @@
455
496
  - http://www.comedycentral.com/videos/index.jhtml?*
456
497
  - http://www.confreaks.com/videos/*
457
498
  - http://www.confreaks.net/videos/*
458
- - http://www.crunchbase.com/*/*
459
499
  - http://www.dailymile.com/people/*/entries/*
460
500
  - http://www.dnbradio.com/*
501
+ - http://www.dreambroker.com/channel/*
461
502
  - http://www.etsy.com/listing/*
462
503
  - http://www.eyeem.com/a/*
463
504
  - http://www.eyeem.com/p/*
464
505
  - http://www.eyeem.com/u/*
465
506
  - http://www.facebook.com/*/photos/*
466
507
  - http://www.facebook.com/*/posts/*
508
+ - http://www.facebook.com/*/videos/*
467
509
  - http://www.facebook.com/photo.php*
468
510
  - http://www.facebook.com/video.php*
469
511
  - http://www.fiverr.com/*/*
@@ -480,11 +522,15 @@
480
522
  - http://www.gametrailers.com/video*
481
523
  - http://www.gettyimages.com/detail/photo/*
482
524
  - http://www.giflike.com/a/*
525
+ - http://www.globalgiving.org/funds/*
526
+ - http://www.globalgiving.org/microprojects/*
527
+ - http://www.globalgiving.org/projects/*
483
528
  - http://www.globalpost.com/dispatch/*
484
529
  - http://www.globalpost.com/video/*
485
530
  - http://www.godtube.com/featured/video/*
486
531
  - http://www.godtube.com/watch/*
487
532
  - http://www.gogoyoko.com/song/*
533
+ - http://www.google.*/maps/*
488
534
  - http://www.google.com/profiles/*
489
535
  - http://www.grindtv.com/*/video/*
490
536
  - http://www.guardian.co.uk/*/video/*/*/*/*
@@ -499,6 +545,7 @@
499
545
  - http://www.ifood.tv/recipe/*
500
546
  - http://www.ifood.tv/video/*
501
547
  - http://www.ign.com/videos/*
548
+ - http://www.instagram.com/p/*
502
549
  - http://www.isnare.com/*
503
550
  - http://www.izlesene.com/video/
504
551
  - http://www.jdsupra.com/legalnews/*
@@ -516,6 +563,7 @@
516
563
  - http://www.livestream.com/*
517
564
  - http://www.logotv.com/video/*
518
565
  - http://www.lonelyplanet.com/Clip.aspx?*
566
+ - http://www.lynda.com/*
519
567
  - http://www.meinvz.net/*
520
568
  - http://www.meinvz.net/Gadgets/Info/*
521
569
  - http://www.meinvz.net/Gadgets/Install/*
@@ -538,33 +586,38 @@
538
586
  - http://www.myspace.com/index.cfm?fuseaction=*&videoid*
539
587
  - http://www.myvideo.de/watch/*
540
588
  - http://www.nbcnews.com/*
589
+ - http://www.newhive.com/*/*
541
590
  - http://www.npr.org/*/*/*/*/*
542
591
  - http://www.npr.org/*/*/*/*/*/*
543
592
  - http://www.npr.org/*/*/*/*/*/*/*
544
593
  - http://www.npr.org/templates/story/story.php*
545
594
  - http://www.nytimes.com/video/*/*
546
595
  - http://www.nzonscreen.com/title/*
596
+ - http://www.oumy.com/v/*
547
597
  - http://www.overstream.net/view.php?oid=*
548
598
  - http://www.pastie.org/*
549
599
  - http://www.pixorial.com/watch/*
550
600
  - http://www.polleverywhere.com/free_text_polls/*
551
601
  - http://www.polleverywhere.com/multiple_choice_polls/*
552
602
  - http://www.polleverywhere.com/polls/*
603
+ - http://www.publons.com/author/*
553
604
  - http://www.quantcast.com/*
554
605
  - http://www.quantcast.com/wd:*
555
606
  - http://www.questionablecontent.net/
556
607
  - http://www.questionablecontent.net/comics/*.png
557
608
  - http://www.questionablecontent.net/view.php*
558
- - http://www.quora.com/*
609
+ - http://www.quora.com/*/answer/*
559
610
  - http://www.qwantz.com/index.php?comic=*
560
611
  - http://www.qwiki.com/q/*
561
- - http://www.radionomy.com/*/radio/*
612
+ - http://www.qzzr.com/quiz/*
562
613
  - http://www.radioreddit.com/?q=songs*
563
614
  - http://www.radioreddit.com/songs*
564
615
  - http://www.rdio.com/#/artist/*/album/*
565
616
  - http://www.rdio.com/artist/*/album/*
566
617
  - http://www.redux.com/f/*/*
567
618
  - http://www.redux.com/stream/item/*/*
619
+ - http://www.relayto.com/*
620
+ - http://www.reuters.com/video/*
568
621
  - http://www.reuters.com/video/*
569
622
  - http://www.rts.ch/play/tv/*
570
623
  - http://www.saynow.com/playMsg.html*
@@ -587,6 +640,7 @@
587
640
  - http://www.shopstyle.com/action/apiVisitRetailer*
588
641
  - http://www.shopstyle.com/action/viewLook*
589
642
  - http://www.shopstyle.com/browse*
643
+ - http://www.shorti.org/*
590
644
  - http://www.showme.com/sh/*
591
645
  - http://www.sliderocket.com/*
592
646
  - http://www.slideshare.net/*/*
@@ -667,6 +721,7 @@
667
721
  - http://www.xiami.com/song/*
668
722
  - http://www.xkcd.com/*
669
723
  - http://www.xtranormal.com/watch/*
724
+ - http://www.youtube.com/attribution_link*
670
725
  - http://www.youtube.com/embed/*
671
726
  - http://www.youtube.com/gif*
672
727
  - http://www.zapiks.com/*
@@ -678,16 +733,30 @@
678
733
  - http://xkcd.com/*
679
734
  - http://yahoo.com/movies/*
680
735
  - http://youtu.be/*
736
+ - http://youtube.ca/*
737
+ - http://youtube.co.uk/*
738
+ - http://youtube.com.br/*
739
+ - http://youtube.com/attribution_link*
681
740
  - http://youtube.com/gif*
741
+ - http://youtube.es/*
742
+ - http://youtube.fr/*
743
+ - http://youtube.ie/*
744
+ - http://youtube.jp/*
745
+ - http://youtube.nl/*
746
+ - http://youtube.pl/*
682
747
  - http://zeit.de/video/*
683
748
  - http://zie.nl/video/*
684
749
  - https://*.23video.com/*
750
+ - https://*.accredible.com/*
685
751
  - https://*.brainsonic.com/*
686
752
  - https://*.cartodb.com/*/*
687
753
  - https://*.crocodoc.com/*
754
+ - https://*.hosted.panopto.com/*
688
755
  - https://*.iplayerhd.com/player/video/*
689
756
  - https://*.iplayerhd.com/playerframe/*
757
+ - https://*.kaltura.com/*
690
758
  - https://*.looplogic.com/*
759
+ - https://*.silk.co/explore/*
691
760
  - https://*.stream.co.jp/apiservice/*
692
761
  - https://*.stream.ne.jp/apiservice/*
693
762
  - https://*.wi.st/*
@@ -698,40 +767,60 @@
698
767
  - https://*vidyard.com/*
699
768
  - https://*youtube.com/watch*
700
769
  - https://23video.com/*
770
+ - https://accredible.com/*
771
+ - https://alpha.vrchive.com/*
701
772
  - https://animoto.com/play/*
702
773
  - https://api.lovelive.tv/v1/*
703
774
  - https://app.devhv.com/oembed/*
775
+ - https://app.stghv.com/*
776
+ - https://app.videocheckout.com/embed/*
704
777
  - https://app.wistia.com/embed/medias/*
778
+ - https://blab.im/*
705
779
  - https://bop.fm/a/*
706
780
  - https://bop.fm/p/*
707
781
  - https://bop.fm/s/*/*
708
782
  - https://brainshark.com/*/*
709
783
  - https://brainsonic.com/*
710
784
  - https://bunkrapp.com/*/*
785
+ - https://calameo.com/*
711
786
  - https://chirb.it/*
712
787
  - https://clipmine.com/embed/*
713
788
  - https://clipmine.com/video/*
789
+ - https://clippituser.tv/*
714
790
  - https://clipter.com/c/*
715
791
  - https://cloudup.com/*
716
792
  - https://clyp.it/*
717
793
  - https://codepicnic.com/bites/*
718
794
  - https://codepicnic.com/consoles/*
795
+ - https://coub.com/embed/*
796
+ - https://coub.com/view/*
719
797
  - https://crocodoc.com/*
798
+ - https://dreambroker.com/channel/*
720
799
  - https://fb.me/*
721
800
  - https://flowvella.com/s/*
722
801
  - https://foursquare.com/*
723
802
  - https://fr.peoplbrain.com/tutoriaux/*
724
803
  - https://ganxy.com/*
725
804
  - https://gfycat.com/*
805
+ - https://gifs.com/*
806
+ - https://gifs.com/gif/*
726
807
  - https://gist.github.com/*
808
+ - https://glitter.club/*
809
+ - https://google.*/maps/*
727
810
  - https://hackpad.com/*
728
811
  - https://ifttt.com/recipes/*
812
+ - https://iloopit.net/*/*
729
813
  - https://img.skitch.com/*
814
+ - https://invis.io/*
815
+ - https://it.youtube.com/*
730
816
  - https://itunes.apple.com/*
731
817
  - https://khanacademy.org/*
818
+ - https://lynda.com/*
819
+ - https://lynda.com/*
732
820
  - https://maps.google.com/?*
733
821
  - https://maps.google.com/maps/ms?*
734
822
  - https://maps.google.com/maps?*
823
+ - https://marvelapp.com/*
735
824
  - https://medium.com/*
736
825
  - https://medium.com/*/*
737
826
  - https://megavisor.com/en/view/*
@@ -741,19 +830,29 @@
741
830
  - https://mix.office.com/mix/*
742
831
  - https://mix.office.com/watch/*
743
832
  - https://mixbit.com/v/*
833
+ - https://my.storygami.com/video/*
834
+ - https://newhive.com/*/*
835
+ - https://newhive.com/*/*
744
836
  - https://open.spotify.com/*
837
+ - https://oumy.com/v/*
745
838
  - https://picasaweb.google.com*/*/*
746
839
  - https://picasaweb.google.com*/*/*#*
747
840
  - https://picasaweb.google.com*/lh/photo/*
748
841
  - https://play.spotify.com/*
842
+ - https://player.videopath.com/*
749
843
  - https://player.vimeo.com/*
844
+ - https://plays.tv/video/*
750
845
  - https://plus.google.com/*
846
+ - https://pollplug.com/poll/*
751
847
  - https://portfolium.com/entry/*
848
+ - https://projects.invisionapp.com/share/*
752
849
  - https://public.chartblocks.com/c/*
753
- - https://quora.com/*
850
+ - https://publons.com/author/*
851
+ - https://quora.com/*/answer/*
754
852
  - https://rapidengage.com/s/*
755
853
  - https://readtapestry.com/s/*/
756
854
  - https://reelhouse.org/*
855
+ - https://relayto.com/*
757
856
  - https://screen.yahoo.com/*/*
758
857
  - https://scribblemaps.com/maps/view/*/*
759
858
  - https://sendvid.com/*
@@ -761,6 +860,7 @@
761
860
  - https://sketchfab.com/models/*
762
861
  - https://sketchfab.com/show/*
763
862
  - https://skitch.com/*/*/*
863
+ - https://slidr.io/*/*
764
864
  - https://soundcloud.com/*
765
865
  - https://soundcloud.com/*/*
766
866
  - https://soundcloud.com/*/sets/*
@@ -768,38 +868,72 @@
768
868
  - https://speakerdeck.com/*/*
769
869
  - https://stepic.org/*
770
870
  - https://storify.com/*/*
871
+ - https://streamable.com/*
771
872
  - https://streamio.com/api/v1/*
772
873
  - https://tr.instela.com/*
773
874
  - https://tun.in/*
774
875
  - https://tunein.com/*
876
+ - https://uploadly.com/*
775
877
  - https://urtak.com/clr/*
776
878
  - https://urtak.com/u/*
777
879
  - https://vid.me/*
778
880
  - https://vidd.me/*
779
881
  - https://video.esri.com/*
780
882
  - https://video214.com/play/*
883
+ - https://view.stacker.cc/*
884
+ - https://view.stacker.cc/*
781
885
  - https://vimeo.com/*
782
886
  - https://vine.co/v/*
887
+ - https://w.graphiq.com/w/*
783
888
  - https://wi.st/*
784
889
  - https://wistia.com/*
785
890
  - https://www.allego.com/*
786
891
  - https://www.brainshark.com/*/*
787
892
  - https://www.branchtrack.com/projects/*
893
+ - https://www.calameo.com/*
894
+ - https://www.clippituser.tv/*
895
+ - https://www.dreambroker.com/channel/*
788
896
  - https://www.facebook.com/*/photos/*
789
897
  - https://www.facebook.com/*/posts/*
898
+ - https://www.facebook.com/*/videos/*
790
899
  - https://www.facebook.com/photo.php*
791
900
  - https://www.facebook.com/video.php*
901
+ - https://www.flat.io/score/*
792
902
  - https://www.foursquare.com/*
793
903
  - https://www.ganxy.com/*
904
+ - https://www.gifs.com/*
905
+ - https://www.gifs.com/gif/*
906
+ - https://www.globalgiving.org/funds/*
907
+ - https://www.globalgiving.org/microprojects/*
908
+ - https://www.globalgiving.org/projects/*
909
+ - https://www.google.*/maps/*
910
+ - https://www.instagram.com/p/*
794
911
  - https://www.khanacademy.org/*
795
- - https://www.quora.com/*
912
+ - https://www.newhive.com/*/*
913
+ - https://www.oumy.com/v/*
914
+ - https://www.publons.com/author/*
915
+ - https://www.quora.com/*/answer/*
916
+ - https://www.qzzr.com/quiz/*
796
917
  - https://www.reelhouse.org/*
918
+ - https://www.relayto.com/*
797
919
  - https://www.scribblemaps.com/maps/view/*/*
798
920
  - https://www.streamio.com/api/v1/*
799
921
  - https://www.vimeo.com/*
800
922
  - https://www.vine.co/v/*
801
923
  - https://www.wedgies.com/question/*
924
+ - https://www.youtube.com/attribution_link*
802
925
  - https://www.youtube.com/embed/*
803
926
  - https://www.youtube.com/gif*
804
927
  - https://yahoo.com/movies/*
928
+ - https://youtu.be/*
929
+ - https://youtube.ca/*
930
+ - https://youtube.co.uk/*
931
+ - https://youtube.com.br/*
932
+ - https://youtube.com/attribution_link*
805
933
  - https://youtube.com/gif*
934
+ - https://youtube.es/*
935
+ - https://youtube.fr/*
936
+ - https://youtube.ie/*
937
+ - https://youtube.jp/*
938
+ - https://youtube.nl/*
939
+ - https://youtube.pl/*