video_info 2.2.0 → 2.2.1

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: 58cc86ef25f00b1ffc554c0765a0a44cdfd1431a
4
- data.tar.gz: cd5cf65c26ce4431441ba20260104ea207500d31
3
+ metadata.gz: 34fa8c0235193cb849e7c8ff1ed6a8c265e66d30
4
+ data.tar.gz: a345c23df6ba552549a736d6647197d8eac2d359
5
5
  SHA512:
6
- metadata.gz: cf64eb48e870c0d60099de9d8a7df0005fa442b6b93e1581a3fdd2aa9c603bdeeecf4b3cb41e37804d6b8064d3b081f32d6c5db32f3de471afd0b6f0f656423e
7
- data.tar.gz: ecb8bbdd71b372c12cbd0749a47eb7b4a63a1a65d60a5365c113c8ca25a429015a5ff0ac5996d0e09a39ee08e0d8753791996dfc3ba1f880fafbe0f4372bb415
6
+ metadata.gz: caa91c99b1731d30a3a89778062036a666c77731b19ead0e98c76d159c4f9671288492992c7a4e481d8321f8062b2895e02af21dcc2023866a9f3ab3df226b9d
7
+ data.tar.gz: 65dc17b5380ae4e320972a4727284688fa4b8b37eecb0f2778ea4819896e904924a02ed1850da55b911663ac3721ac2f53bb979c6d1f750965da0d5d93d91e28
@@ -3,7 +3,7 @@ class VideoInfo
3
3
  class Youtube < Provider
4
4
 
5
5
  def self.usable?(url)
6
- url =~ /(youtube\.com\/(?!playlist).*)|(youtu\.be)/
6
+ url =~ /(youtube\.com\/(?!playlist|embed\/videoseries).*)|(youtu\.be)/
7
7
  end
8
8
 
9
9
  def provider
@@ -5,7 +5,7 @@ class VideoInfo
5
5
  alias_method :playlist_id, :video_id
6
6
 
7
7
  def self.usable?(url)
8
- url =~ /(youtube\.com)\/playlist/
8
+ url =~ /((youtube\.com)\/playlist)|((youtube\.com)\/embed\/videoseries)/
9
9
  end
10
10
 
11
11
  def videos
@@ -37,7 +37,7 @@ class VideoInfo
37
37
  end
38
38
 
39
39
  def _url_regex
40
- /youtube.com\/playlist\?p=(\S*)/
40
+ /youtube.com\/playlist\?p=(\S*)|youtube.com\/embed\/videoseries\?list=([a-zA-Z0-9-]*)/
41
41
  end
42
42
 
43
43
  def _api_path
@@ -1,3 +1,3 @@
1
1
  class VideoInfo
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
@@ -63,4 +63,18 @@ describe VideoInfo::Providers::YoutubePlaylist do
63
63
  its(:videos) { should match_array(videos) }
64
64
  its(:view_count) { should be_nil }
65
65
  end
66
+
67
+ context "with playlist PL0E8117603D70E10A in embed path", :vcr do
68
+ subject { VideoInfo.new('http://www.youtube.com/embed/videoseries?list=PL0E8117603D70E10A') }
69
+
70
+ its(:playlist_id) { should eq 'PL0E8117603D70E10A' }
71
+ end
72
+
73
+ context "with playlist PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr in embed path", :vcr do
74
+ subject { VideoInfo.new('http://www.youtube.com/embed/videoseries?list=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr') }
75
+
76
+ its(:playlist_id) { should eq 'PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr' }
77
+ end
78
+
79
+
66
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-23 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 2.2.1
248
+ rubygems_version: 2.2.2
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: Dailymotion, Vimeo, VK and YouTube info parser.