video_info 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34fa8c0235193cb849e7c8ff1ed6a8c265e66d30
|
4
|
+
data.tar.gz: a345c23df6ba552549a736d6647197d8eac2d359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa91c99b1731d30a3a89778062036a666c77731b19ead0e98c76d159c4f9671288492992c7a4e481d8321f8062b2895e02af21dcc2023866a9f3ab3df226b9d
|
7
|
+
data.tar.gz: 65dc17b5380ae4e320972a4727284688fa4b8b37eecb0f2778ea4819896e904924a02ed1850da55b911663ac3721ac2f53bb979c6d1f750965da0d5d93d91e28
|
@@ -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
|
data/lib/video_info/version.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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.
|