video_info 2.2.1 → 2.2.2

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: 34fa8c0235193cb849e7c8ff1ed6a8c265e66d30
4
- data.tar.gz: a345c23df6ba552549a736d6647197d8eac2d359
3
+ metadata.gz: 2ddcd66b117bba40d3caaabd137a7f9fa2abb3eb
4
+ data.tar.gz: fc14527e675c4815cc266fa5220b34dbbde8310d
5
5
  SHA512:
6
- metadata.gz: caa91c99b1731d30a3a89778062036a666c77731b19ead0e98c76d159c4f9671288492992c7a4e481d8321f8062b2895e02af21dcc2023866a9f3ab3df226b9d
7
- data.tar.gz: 65dc17b5380ae4e320972a4727284688fa4b8b37eecb0f2778ea4819896e904924a02ed1850da55b911663ac3721ac2f53bb979c6d1f750965da0d5d93d91e28
6
+ metadata.gz: 0931fcb59e451f781bbe58d30a0b590f8bd4c673968b361d0023dc2696e911d1aa5bd586f0e2032f9a9f54e7d09620e752addd8dcd7c94bb32fd8cd186fdb6d8
7
+ data.tar.gz: 504a3ea41e0b4ad6f084cb642bec105406cb0d0197d6ccb10337536e473b934dd99ecb26e8b9b0ff9c246158626c5375b497fc3f8152d8e99cfd70ccc25b364a
@@ -45,6 +45,7 @@ class VideoInfo
45
45
  end
46
46
 
47
47
  def _playlist_video_ids
48
+ return [] unless _playlist_entry['entry']
48
49
  _playlist_entry['entry'].map do |entry|
49
50
  entry['media$group']['yt$videoid']['$t']
50
51
  end
@@ -1,3 +1,3 @@
1
1
  class VideoInfo
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://gdata.youtube.com/feeds/api/playlists/PL0E8117603D70E10A?alt=json&v=2
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - VideoInfo/2.2.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Gdata-User-Country:
22
+ - GB
23
+ Content-Type:
24
+ - application/json; charset=UTF-8
25
+ Access-Control-Allow-Origin:
26
+ - "*"
27
+ Expires:
28
+ - Thu, 27 Feb 2014 09:12:55 GMT
29
+ Date:
30
+ - Thu, 27 Feb 2014 09:07:55 GMT
31
+ Cache-Control:
32
+ - public, max-age=300, no-transform
33
+ Vary:
34
+ - Accept, X-GData-Authorization, GData-Version
35
+ Gdata-Version:
36
+ - '2.1'
37
+ Etag:
38
+ - W/"A0cHQX47eCp7I2A9WhdSF0w."
39
+ Last-Modified:
40
+ - Tue, 26 Jul 2011 22:23:50 GMT
41
+ Transfer-Encoding:
42
+ - chunked
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Frame-Options:
46
+ - SAMEORIGIN
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ Server:
50
+ - GSE
51
+ Alternate-Protocol:
52
+ - 80:quic
53
+ body:
54
+ encoding: UTF-8
55
+ string: "{\"version\":\"1.0\",\"encoding\":\"UTF-8\",\"feed\":{\"xmlns\":\"http://www.w3.org/2005/Atom\",\"xmlns$media\":\"http://search.yahoo.com/mrss/\",\"xmlns$openSearch\":\"http://a9.com/-/spec/opensearch/1.1/\",\"xmlns$gd\":\"http://schemas.google.com/g/2005\",\"xmlns$yt\":\"http://gdata.youtube.com/schemas/2007\",\"gd$etag\":\"W/\\\"A0cHQX47eCp7I2A9WhdSF0w.\\\"\",\"id\":{\"$t\":\"tag:youtube.com,2008:playlist:PL0E8117603D70E10A\"},\"updated\":{\"$t\":\"2011-07-26T22:23:50.000Z\"},\"category\":[{\"scheme\":\"http://schemas.google.com/g/2005#kind\",\"term\":\"http://gdata.youtube.com/schemas/2007#playlist\"}],\"title\":{\"$t\":\"Anthrax
56
+ War\"},\"subtitle\":{\"$t\":\"\"},\"logo\":{\"$t\":\"http://www.gstatic.com/youtube/img/logo.png\"},\"link\":[{\"rel\":\"alternate\",\"type\":\"text/html\",\"href\":\"http://www.youtube.com/playlist?list=PL0E8117603D70E10A\"},{\"rel\":\"http://schemas.google.com/g/2005#feed\",\"type\":\"application/atom+xml\",\"href\":\"http://gdata.youtube.com/feeds/api/playlists/PL0E8117603D70E10A?v=2\"},{\"rel\":\"http://schemas.google.com/g/2005#batch\",\"type\":\"application/atom+xml\",\"href\":\"http://gdata.youtube.com/feeds/api/playlists/PL0E8117603D70E10A/batch?v=2\"},{\"rel\":\"self\",\"type\":\"application/atom+xml\",\"href\":\"http://gdata.youtube.com/feeds/api/playlists/PL0E8117603D70E10A?alt=json&start-index=1&max-results=25&v=2\"},{\"rel\":\"service\",\"type\":\"application/atomsvc+xml\",\"href\":\"http://gdata.youtube.com/feeds/api/playlists/PL0E8117603D70E10A?alt=atom-service&v=2\"}],\"author\":[{\"name\":{\"$t\":\"sprword\"},\"uri\":{\"$t\":\"http://gdata.youtube.com/feeds/api/users/sprword\"},\"yt$userId\":{\"$t\":\"w9KftjwRV1cQqzcUnqzGmA\"}}],\"generator\":{\"$t\":\"YouTube
57
+ data API\",\"version\":\"2.1\",\"uri\":\"http://gdata.youtube.com\"},\"openSearch$totalResults\":{\"$t\":7},\"openSearch$startIndex\":{\"$t\":1},\"openSearch$itemsPerPage\":{\"$t\":25},\"media$group\":{\"media$content\":[{\"url\":\"http://www.youtube.com/p/PL0E8117603D70E10A\",\"type\":\"application/x-shockwave-flash\",\"yt$format\":5}],\"media$thumbnail\":[{\"url\":\"http://i.ytimg.com/vi/GaD0g2T3o-M/default.jpg\",\"height\":90,\"width\":120,\"yt$name\":\"default\"},{\"url\":\"http://i.ytimg.com/vi/GaD0g2T3o-M/mqdefault.jpg\",\"height\":180,\"width\":320,\"yt$name\":\"mqdefault\"},{\"url\":\"http://i.ytimg.com/vi/GaD0g2T3o-M/hqdefault.jpg\",\"height\":360,\"width\":480,\"yt$name\":\"hqdefault\"}],\"media$title\":{\"$t\":\"Anthrax
58
+ War\",\"type\":\"plain\"}},\"yt$playlistId\":{\"$t\":\"PL0E8117603D70E10A\"}}}"
59
+ http_version:
60
+ recorded_at: Thu, 27 Feb 2014 09:07:55 GMT
61
+ recorded_with: VCR 2.8.0
@@ -68,6 +68,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
68
68
  subject { VideoInfo.new('http://www.youtube.com/embed/videoseries?list=PL0E8117603D70E10A') }
69
69
 
70
70
  its(:playlist_id) { should eq 'PL0E8117603D70E10A' }
71
+ its(:videos) { should eq [] }
71
72
  end
72
73
 
73
74
  context "with playlist PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr in embed path", :vcr do
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.1
4
+ version: 2.2.2
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-26 00:00:00.000000000 Z
11
+ date: 2014-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -205,6 +205,7 @@ files:
205
205
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/view_count/.yml
206
206
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/available_/.yml
207
207
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/available_/.yml
208
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL0E8117603D70E10A_in_embed_path/videos/.yml
208
209
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/.yml
209
210
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/date/.yml
210
211
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/description/.yml
@@ -312,6 +313,7 @@ test_files:
312
313
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/view_count/.yml
313
314
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/available_/.yml
314
315
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/available_/.yml
316
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL0E8117603D70E10A_in_embed_path/videos/.yml
315
317
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/.yml
316
318
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/date/.yml
317
319
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/description/.yml