video_info 2.8.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/unit_test.yml +39 -0
  3. data/Guardfile +1 -1
  4. data/README.md +8 -21
  5. data/lib/video_info.rb +2 -3
  6. data/lib/video_info/provider.rb +3 -2
  7. data/lib/video_info/providers/vimeo_scraper.rb +12 -2
  8. data/lib/video_info/providers/youtube.rb +4 -0
  9. data/lib/video_info/providers/youtube_api.rb +1 -1
  10. data/lib/video_info/providers/youtube_scraper.rb +42 -25
  11. data/lib/video_info/providers/youtubeplaylist_api.rb +15 -1
  12. data/lib/video_info/version.rb +1 -1
  13. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +26 -37
  14. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +26 -35
  15. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +31 -40
  16. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +31 -40
  17. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +31 -40
  18. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +31 -40
  19. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +31 -40
  20. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +31 -40
  21. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +31 -40
  22. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/{1_3_19_1.yml → 1_3_21_1.yml} +31 -40
  23. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +31 -40
  24. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +31 -40
  25. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +31 -40
  26. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +31 -40
  27. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/{1_3_20_1.yml → 1_3_22_1.yml} +31 -40
  28. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +38 -37
  29. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +28 -25
  30. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +44 -41
  31. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +26 -23
  32. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +46 -38
  33. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +24 -23
  34. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +33 -31
  35. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +33 -31
  36. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +32 -28
  37. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +33 -31
  38. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +34 -34
  39. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +33 -30
  40. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +34 -32
  41. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +33 -30
  42. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +34 -34
  43. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +34 -33
  44. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +34 -33
  45. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +34 -33
  46. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +33 -31
  47. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +34 -33
  48. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +34 -33
  49. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_20_1.yml +158 -0
  50. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_20_1.yml +80 -0
  51. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_19_1.yml +158 -0
  52. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_19_1.yml +85 -0
  53. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_21_1.yml +159 -0
  54. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_21_1.yml +80 -0
  55. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +82 -68
  56. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +44 -34
  57. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +36 -35
  58. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +45 -37
  59. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +39 -33
  60. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +46 -38
  61. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +36 -35
  62. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +85 -71
  63. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_18_1.yml +236 -0
  64. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_18_1.yml +82 -0
  65. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +67 -53
  66. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +37 -34
  67. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +67 -54
  68. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +37 -32
  69. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +67 -53
  70. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +37 -32
  71. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +45 -36
  72. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +39 -33
  73. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_22_1.yml +158 -0
  74. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_22_1.yml +84 -0
  75. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +46 -40
  76. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +37 -34
  77. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/1_12_1_1.yml +234 -0
  78. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/2_12_1_1.yml +78 -0
  79. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/1_12_2_1.yml +233 -0
  80. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/2_12_2_1.yml +78 -0
  81. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/1_12_3_1.yml +235 -0
  82. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/2_12_3_1.yml +73 -0
  83. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/1_12_4_1.yml +234 -0
  84. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/2_12_4_1.yml +77 -0
  85. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +25 -17
  86. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +28 -18
  87. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +33 -25
  88. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +33 -25
  89. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +33 -24
  90. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +34 -25
  91. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +33 -25
  92. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +33 -24
  93. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +33 -24
  94. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +33 -25
  95. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +33 -23
  96. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/{1_3_13_1.yml → 1_3_15_1.yml} +33 -23
  97. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +33 -23
  98. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +33 -23
  99. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +33 -25
  100. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +33 -25
  101. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +33 -23
  102. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +20 -442
  103. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +81 -21
  104. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +24 -446
  105. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +81 -21
  106. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +25 -449
  107. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +81 -21
  108. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +24 -450
  109. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +81 -21
  110. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +23 -449
  111. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +81 -21
  112. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +24 -446
  113. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +81 -21
  114. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_18_1.yml +59 -0
  115. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_18_1.yml +114 -0
  116. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +23 -20
  117. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +152 -90
  118. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +23 -447
  119. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +81 -21
  120. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_a_video_without_description/_description/1_1_1_1.yml +59 -0
  121. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +181 -110
  122. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +22 -19
  123. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +152 -90
  124. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +23 -20
  125. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +152 -90
  126. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +23 -20
  127. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +152 -90
  128. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +20 -17
  129. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +152 -90
  130. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_17_1.yml +59 -0
  131. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_17_1.yml +187 -0
  132. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +74 -15
  133. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +152 -90
  134. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +74 -15
  135. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +271 -144
  136. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +21 -18
  137. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +271 -144
  138. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/can_be_called_twice_and_receive_the_same_value.yml +391 -0
  139. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +173 -108
  140. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +23 -19
  141. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +152 -90
  142. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +21 -18
  143. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +152 -90
  144. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +21 -18
  145. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +152 -90
  146. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +23 -20
  147. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +152 -90
  148. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_21_1.yml +59 -0
  149. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_21_1.yml +187 -0
  150. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +87 -27
  151. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +120 -60
  152. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +120 -60
  153. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_21_1.yml +165 -0
  154. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_22_1.yml +274 -0
  155. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_23_1.yml +274 -0
  156. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +131 -71
  157. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +131 -71
  158. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_18_1.yml +165 -0
  159. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +131 -71
  160. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large_2x/1_3_16_1.yml +165 -0
  161. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_maxres/1_3_17_1.yml +165 -0
  162. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +131 -71
  163. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +131 -71
  164. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +131 -71
  165. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +78 -231
  166. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +81 -21
  167. data/spec/lib/video_info/providers/dailymotion_spec.rb +6 -6
  168. data/spec/lib/video_info/providers/vimeo_spec.rb +21 -21
  169. data/spec/lib/video_info/providers/wistia_spec.rb +6 -6
  170. data/spec/lib/video_info/providers/youtube_playlist_spec.rb +22 -28
  171. data/spec/lib/video_info/providers/youtube_scraper_spec.rb +4 -2
  172. data/spec/lib/video_info/providers/youtube_spec.rb +28 -26
  173. data/spec/lib/video_info_spec.rb +0 -4
  174. data/spec/spec_helper.rb +6 -1
  175. data/tmp/rspec_guard_result +25 -0
  176. data/video_info.gemspec +4 -4
  177. metadata +85 -215
  178. data/.travis.yml +0 -21
  179. data/lib/video_info/providers/vkontakte.rb +0 -208
  180. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_18_1.yml +0 -150
  181. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_18_1.yml +0 -79
  182. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_17_1.yml +0 -150
  183. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_17_1.yml +0 -79
  184. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_19_1.yml +0 -150
  185. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_19_1.yml +0 -79
  186. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_16_1.yml +0 -222
  187. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_16_1.yml +0 -79
  188. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_20_1.yml +0 -150
  189. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_20_1.yml +0 -79
  190. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/1_12_1_1.yml +0 -222
  191. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/2_12_1_1.yml +0 -75
  192. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/1_12_2_1.yml +0 -222
  193. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/2_12_2_1.yml +0 -75
  194. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/1_12_3_1.yml +0 -222
  195. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/2_12_3_1.yml +0 -75
  196. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/1_12_4_1.yml +0 -222
  197. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/2_12_4_1.yml +0 -75
  198. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +0 -86
  199. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +0 -50
  200. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +0 -132
  201. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +0 -134
  202. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect_to_main_page_for_auth/available_/1_2_5_1_1.yml +0 -85
  203. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +0 -87
  204. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author/1_5_14_1.yml +0 -48
  205. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_thumbnail/1_5_15_1.yml +0 -48
  206. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_url/1_5_16_1.yml +0 -48
  207. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +0 -48
  208. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +0 -48
  209. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_code/1_5_6_1.yml +0 -48
  210. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_url/1_5_5_1.yml +0 -48
  211. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +0 -48
  212. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/thumbnail_small/1_5_18_1.yml +0 -48
  213. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +0 -48
  214. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/view_count/1_5_13_1.yml +0 -48
  215. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +0 -50
  216. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/author/1_3_7_1.yml +0 -48
  217. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/embed_code/1_3_6_1.yml +0 -48
  218. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/embed_url/1_3_5_1.yml +0 -48
  219. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/title/1_3_4_1.yml +0 -48
  220. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +0 -48
  221. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +0 -48
  222. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/description/1_6_8_1.yml +0 -48
  223. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/duration/1_6_10_1.yml +0 -48
  224. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_code/1_6_6_1.yml +0 -48
  225. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_url/1_6_5_1.yml +0 -48
  226. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/height/1_6_12_1.yml +0 -48
  227. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/title/1_6_7_1.yml +0 -48
  228. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/view_count/1_6_13_1.yml +0 -48
  229. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/width/1_6_11_1.yml +0 -48
  230. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +0 -48
  231. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +0 -48
  232. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +0 -48
  233. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +0 -48
  234. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/foo/_available/1_2_2_1_1.yml +0 -1447
  235. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/foo/_available/2_2_2_1_1.yml +0 -156
  236. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_3_1_1.yml +0 -485
  237. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_3_1_1.yml +0 -54
  238. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_3_11_1.yml +0 -481
  239. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_3_11_1.yml +0 -54
  240. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_3_8_1.yml +0 -483
  241. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_3_8_1.yml +0 -54
  242. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_3_10_1.yml +0 -484
  243. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_3_10_1.yml +0 -54
  244. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_3_9_1.yml +0 -484
  245. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_3_9_1.yml +0 -54
  246. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_3_7_1.yml +0 -484
  247. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_3_7_1.yml +0 -54
  248. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_17_1.yml +0 -485
  249. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_3_17_1.yml +0 -485
  250. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_17_1.yml +0 -54
  251. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_3_17_1.yml +0 -54
  252. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_4_1_1.yml +0 -484
  253. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_4_1_1.yml +0 -54
  254. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +0 -56
  255. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +0 -125
  256. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_20_1.yml +0 -56
  257. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_20_1.yml +0 -125
  258. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +0 -60
  259. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +0 -94
  260. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +0 -94
  261. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_19_1.yml +0 -105
  262. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/2_3_19_1.yml +0 -105
  263. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_20_1.yml +0 -189
  264. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/2_3_20_1.yml +0 -189
  265. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_21_1.yml +0 -189
  266. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/2_3_21_1.yml +0 -189
  267. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +0 -105
  268. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +0 -105
  269. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_16_1.yml +0 -105
  270. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/2_3_16_1.yml +0 -105
  271. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +0 -105
  272. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +0 -105
  273. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +0 -105
  274. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +0 -105
  275. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +0 -54
  276. data/spec/lib/video_info/providers/vkontakte_spec.rb +0 -236
@@ -1,105 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - VideoInfo/2.7
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
- Expires:
22
- - Mon, 27 Mar 2017 21:01:57 GMT
23
- Date:
24
- - Mon, 27 Mar 2017 21:01:57 GMT
25
- Cache-Control:
26
- - private, max-age=0, must-revalidate, no-transform
27
- Etag:
28
- - '"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI"'
29
- Vary:
30
- - Origin
31
- - X-Origin
32
- Content-Type:
33
- - application/json; charset=UTF-8
34
- X-Content-Type-Options:
35
- - nosniff
36
- X-Frame-Options:
37
- - SAMEORIGIN
38
- X-Xss-Protection:
39
- - 1; mode=block
40
- Content-Length:
41
- - '1515'
42
- Server:
43
- - GSE
44
- Alt-Svc:
45
- - quic=":443"; ma=2592000; v="37,36,35"
46
- body:
47
- encoding: UTF-8
48
- string: |
49
- {
50
- "kind": "youtube#playlistListResponse",
51
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI\"",
52
- "pageInfo": {
53
- "totalResults": 1,
54
- "resultsPerPage": 5
55
- },
56
- "items": [
57
- {
58
- "kind": "youtube#playlist",
59
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/F2mG6YyXZ_T9NjBk6OlhtoKuxPY\"",
60
- "id": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
61
- "snippet": {
62
- "publishedAt": "2013-08-09T05:09:51.000Z",
63
- "channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
64
- "title": "YouTube Policy and Copyright",
65
- "description": "Learn more about copyright basics, flagging, and the YouTube community.",
66
- "thumbnails": {
67
- "default": {
68
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/default.jpg",
69
- "width": 120,
70
- "height": 90
71
- },
72
- "medium": {
73
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/mqdefault.jpg",
74
- "width": 320,
75
- "height": 180
76
- },
77
- "high": {
78
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/hqdefault.jpg",
79
- "width": 480,
80
- "height": 360
81
- },
82
- "standard": {
83
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/sddefault.jpg",
84
- "width": 640,
85
- "height": 480
86
- },
87
- "maxres": {
88
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/maxresdefault.jpg",
89
- "width": 1280,
90
- "height": 720
91
- }
92
- },
93
- "channelTitle": "YouTube Help",
94
- "defaultLanguage": "en",
95
- "localized": {
96
- "title": "YouTube Policy and Copyright",
97
- "description": "Learn more about copyright basics, flagging, and the YouTube community."
98
- }
99
- }
100
- }
101
- ]
102
- }
103
- http_version:
104
- recorded_at: Mon, 27 Mar 2017 21:01:57 GMT
105
- recorded_with: VCR 3.0.3
@@ -1,105 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - VideoInfo/2.7
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
- Expires:
22
- - Mon, 27 Mar 2017 21:01:57 GMT
23
- Date:
24
- - Mon, 27 Mar 2017 21:01:57 GMT
25
- Cache-Control:
26
- - private, max-age=0, must-revalidate, no-transform
27
- Etag:
28
- - '"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI"'
29
- Vary:
30
- - Origin
31
- - X-Origin
32
- Content-Type:
33
- - application/json; charset=UTF-8
34
- X-Content-Type-Options:
35
- - nosniff
36
- X-Frame-Options:
37
- - SAMEORIGIN
38
- X-Xss-Protection:
39
- - 1; mode=block
40
- Content-Length:
41
- - '1515'
42
- Server:
43
- - GSE
44
- Alt-Svc:
45
- - quic=":443"; ma=2592000; v="37,36,35"
46
- body:
47
- encoding: UTF-8
48
- string: |
49
- {
50
- "kind": "youtube#playlistListResponse",
51
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI\"",
52
- "pageInfo": {
53
- "totalResults": 1,
54
- "resultsPerPage": 5
55
- },
56
- "items": [
57
- {
58
- "kind": "youtube#playlist",
59
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/F2mG6YyXZ_T9NjBk6OlhtoKuxPY\"",
60
- "id": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
61
- "snippet": {
62
- "publishedAt": "2013-08-09T05:09:51.000Z",
63
- "channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
64
- "title": "YouTube Policy and Copyright",
65
- "description": "Learn more about copyright basics, flagging, and the YouTube community.",
66
- "thumbnails": {
67
- "default": {
68
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/default.jpg",
69
- "width": 120,
70
- "height": 90
71
- },
72
- "medium": {
73
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/mqdefault.jpg",
74
- "width": 320,
75
- "height": 180
76
- },
77
- "high": {
78
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/hqdefault.jpg",
79
- "width": 480,
80
- "height": 360
81
- },
82
- "standard": {
83
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/sddefault.jpg",
84
- "width": 640,
85
- "height": 480
86
- },
87
- "maxres": {
88
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/maxresdefault.jpg",
89
- "width": 1280,
90
- "height": 720
91
- }
92
- },
93
- "channelTitle": "YouTube Help",
94
- "defaultLanguage": "en",
95
- "localized": {
96
- "title": "YouTube Policy and Copyright",
97
- "description": "Learn more about copyright basics, flagging, and the YouTube community."
98
- }
99
- }
100
- }
101
- ]
102
- }
103
- http_version:
104
- recorded_at: Mon, 27 Mar 2017 21:01:57 GMT
105
- recorded_with: VCR 3.0.3
@@ -1,105 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - VideoInfo/2.7
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
- Expires:
22
- - Mon, 27 Mar 2017 21:01:57 GMT
23
- Date:
24
- - Mon, 27 Mar 2017 21:01:57 GMT
25
- Cache-Control:
26
- - private, max-age=0, must-revalidate, no-transform
27
- Etag:
28
- - '"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI"'
29
- Vary:
30
- - Origin
31
- - X-Origin
32
- Content-Type:
33
- - application/json; charset=UTF-8
34
- X-Content-Type-Options:
35
- - nosniff
36
- X-Frame-Options:
37
- - SAMEORIGIN
38
- X-Xss-Protection:
39
- - 1; mode=block
40
- Content-Length:
41
- - '1515'
42
- Server:
43
- - GSE
44
- Alt-Svc:
45
- - quic=":443"; ma=2592000; v="37,36,35"
46
- body:
47
- encoding: UTF-8
48
- string: |
49
- {
50
- "kind": "youtube#playlistListResponse",
51
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/agg8LwUfxQxkn2kzTfKMNFlldxI\"",
52
- "pageInfo": {
53
- "totalResults": 1,
54
- "resultsPerPage": 5
55
- },
56
- "items": [
57
- {
58
- "kind": "youtube#playlist",
59
- "etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/F2mG6YyXZ_T9NjBk6OlhtoKuxPY\"",
60
- "id": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
61
- "snippet": {
62
- "publishedAt": "2013-08-09T05:09:51.000Z",
63
- "channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
64
- "title": "YouTube Policy and Copyright",
65
- "description": "Learn more about copyright basics, flagging, and the YouTube community.",
66
- "thumbnails": {
67
- "default": {
68
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/default.jpg",
69
- "width": 120,
70
- "height": 90
71
- },
72
- "medium": {
73
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/mqdefault.jpg",
74
- "width": 320,
75
- "height": 180
76
- },
77
- "high": {
78
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/hqdefault.jpg",
79
- "width": 480,
80
- "height": 360
81
- },
82
- "standard": {
83
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/sddefault.jpg",
84
- "width": 640,
85
- "height": 480
86
- },
87
- "maxres": {
88
- "url": "https://i.ytimg.com/vi/Oi67QjrXy2w/maxresdefault.jpg",
89
- "width": 1280,
90
- "height": 720
91
- }
92
- },
93
- "channelTitle": "YouTube Help",
94
- "defaultLanguage": "en",
95
- "localized": {
96
- "title": "YouTube Policy and Copyright",
97
- "description": "Learn more about copyright basics, flagging, and the YouTube community."
98
- }
99
- }
100
- }
101
- ]
102
- }
103
- http_version:
104
- recorded_at: Mon, 27 Mar 2017 21:01:57 GMT
105
- recorded_with: VCR 3.0.3
@@ -1,54 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet&playlistId=PL0E8117603D70E10A
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - VideoInfo/2.7
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
- Expires:
22
- - Mon, 27 Mar 2017 21:01:58 GMT
23
- Date:
24
- - Mon, 27 Mar 2017 21:01:58 GMT
25
- Cache-Control:
26
- - private, max-age=0, must-revalidate, no-transform
27
- Etag:
28
- - '"uQc-MPTsstrHkQcRXL3IWLmeNsM/ewwRz0VbTYpp2EGbOkvZ5M_1mbo"'
29
- Vary:
30
- - Origin
31
- - X-Origin
32
- Content-Type:
33
- - application/json; charset=UTF-8
34
- X-Content-Type-Options:
35
- - nosniff
36
- X-Frame-Options:
37
- - SAMEORIGIN
38
- X-Xss-Protection:
39
- - 1; mode=block
40
- Content-Length:
41
- - '17'
42
- Server:
43
- - GSE
44
- Alt-Svc:
45
- - quic=":443"; ma=2592000; v="37,36,35"
46
- body:
47
- encoding: UTF-8
48
- string: |
49
- {
50
- "items": []
51
- }
52
- http_version:
53
- recorded_at: Mon, 27 Mar 2017 21:01:58 GMT
54
- recorded_with: VCR 3.0.3
@@ -1,236 +0,0 @@
1
- # encoding: UTF-8
2
- require 'spec_helper'
3
- require 'webmock/rspec'
4
-
5
- describe VideoInfo::Providers::Vkontakte do
6
- describe '.usable?' do
7
- subject { VideoInfo::Providers::Vkontakte.usable?(url) }
8
-
9
- context 'with vkontakte url' do
10
- context 'old style', :vcr do
11
- let(:url) { 'http://vk.com/video39576223_108370515' }
12
- it { should be_truthy }
13
- end
14
-
15
- context 'new style', :vcr do
16
- let(:url) do
17
- 'https://vk.com/kirill.lyanoi?z=video2152699' \
18
- '_168591741%2F56fd229a9dfe2dcdbe'
19
- end
20
- it { should be_truthy }
21
- end
22
- end
23
-
24
- context 'with other url' do
25
- let(:url) { 'http://www.youtube.com/898029' }
26
- it { should be_falsey }
27
- end
28
-
29
- context 'with invalid url' do
30
- let(:url) { 'http://vk.com just random data' }
31
- it { should be_falsey }
32
- end
33
-
34
- context 'with spaces at end' do
35
- let(:url) { 'http://vk.com/video39576223_108370515 ' }
36
- it { should be_truthy }
37
- end
38
-
39
- context 'with spaces at start' do
40
- let(:url) { ' http://vk.com/video39576223_108370515' }
41
- it { should be_truthy }
42
- end
43
-
44
- context 'with spaces around url' do
45
- let(:url) { ' http://vk.com/video39576223_108370515 ' }
46
- it { should be_truthy }
47
- end
48
- end
49
-
50
- describe '#available?' do
51
- context 'with valid video', :vcr do
52
- subject { VideoInfo.new('https://vk.com/videos39576223?z=video39576223_165607445%2Fpl_39576223_-2'.freeze) }
53
- its(:available?) { should be_truthy }
54
- end
55
-
56
- context 'with invalid video', :vcr do
57
- subject { VideoInfo.new('http://vk.com/video39576223_invalid') }
58
- its(:available?) { should be_falsey }
59
- end
60
-
61
- context 'with private video', :vcr do
62
- subject { VideoInfo.new('http://vk.com/video39576223_166315543') }
63
- its(:available?) { should be_falsey }
64
- end
65
-
66
- context 'with redirect', :vcr do
67
- video_url = 'http://vk.com/polinka_zh?z=' \
68
- 'video186965901_168185427%2Fbfb2bd2e674031520a'
69
- subject { VideoInfo.new(video_url) }
70
- its(:available?) { should be_truthy }
71
- end
72
-
73
- context 'with redirect to main page for auth', :vcr do
74
- video_url = 'https://vk.com/video?z=video39576223_166315543%2Fpl_cat_updates'
75
- subject { VideoInfo.new(video_url) }
76
- its(:available?) { should be_falsey }
77
- end
78
-
79
- context 'with hashes', :vcr do
80
- video_url = 'https://vk.com/videos43640822#/video43640822_168790809'
81
- subject { VideoInfo.new(video_url) }
82
- its(:available?) { should be_truthy }
83
- end
84
- end
85
-
86
- context 'with video https://vk.com/id44052340?z=' \
87
- 'video61291456_159590018%2F2521d92730a272a9ea', :vcr do
88
- video_url = 'https://vk.com/id44052340?z=' \
89
- 'video61291456_159590018%2F2521d92730a272a9ea'
90
-
91
- subject { VideoInfo.new(video_url) }
92
-
93
- embed_code = '<iframe src="//vk.com/video_ext.php?oid=61291456&' \
94
- 'id=159590018&hash=68174b2af560c54c" frameborder="0" ' \
95
- 'allowfullscreen="allowfullscreen"></iframe>'
96
- embed_url = '//vk.com/video_ext.php?oid=61291456&' \
97
- 'id=159590018&hash=68174b2af560c54c'
98
-
99
- its(:provider) { should eq 'Vkontakte' }
100
- its(:video_owner) { should eq '61291456' }
101
- its(:video_id) { should eq '159590018' }
102
- its(:title) { should eq 'Happy Birthday To You' }
103
- its(:embed_url) { should eq embed_url }
104
- its(:embed_code) { should eq embed_code }
105
- its(:author) { should eq('Tanka Malesh').or(eq('Танька Малеш')) }
106
- end
107
-
108
- context 'with video videos43640822#/video43640822_168790809', :vcr do
109
- video_url = 'https://vk.com/videos43640822#/video43640822_168790809'
110
- subject { VideoInfo.new(video_url) }
111
-
112
- author_thumbnail = 'https://pp.userapi.com/c837422/v837422822/93c8/00oqd-3BS9U.jpg'
113
- video_title = 'UDC open cup 2014/ 3 place / Saley Daria (solo)'
114
-
115
- its(:provider) { should eq 'Vkontakte' }
116
- its(:video_owner) { should eq '43640822' }
117
- its(:video_id) { should eq '168790809' }
118
- its(:title) { should eq video_title }
119
- its(:author) { should eq('Dasha Saley').or(eq('Даша Салей')) }
120
- its(:author_thumbnail) { should eq author_thumbnail }
121
- its(:author_url) { should eq 'https://vk.com/dariasaley' }
122
- end
123
-
124
- context 'with video from kirill.lyanoi?z=' \
125
- 'video2152699_168591741%2F56fd229a9dfe2dcdbe', :vcr do
126
- video_url = 'https://vk.com/kirill.lyanoi?' \
127
- 'z=video2152699_168591741%2F56fd229a9dfe2dcdbe'
128
- subject { VideoInfo.new(video_url) }
129
-
130
- author_thumbnail = 'https://pp.userapi.com/c623824/v623824699/55575/CCQZ29l0B9k.jpg'
131
- thumbnail_small = 'https://pp.userapi.com/c617831/u96123303/video/l_27e4ff5c.jpg'
132
- description_text = 'BEAT SOUL STEP ★ Project818 Russian ' \
133
- 'Dance Championship ★ 1-2 мая, Москва 2014'
134
- video_title = 'BEAT SOUL STEP — RDC14 Project818 Russian ' \
135
- 'Dance Championship, May 1-2, Moscow 2014'
136
- embed_code = '<iframe src="//vk.com/video_ext.php?oid=2152699' \
137
- '&id=168591741&hash=ea1d3db98818125d" frameborder="0" ' \
138
- 'allowfullscreen="allowfullscreen"></iframe>'
139
- embed_url = '//vk.com/video_ext.php?oid=2152699&id=168591741' \
140
- '&hash=ea1d3db98818125d'
141
- author = 'Kirill Lyanoy'
142
- author_alt = 'Кирилл Льяной'
143
-
144
- its(:provider) { should eq 'Vkontakte' }
145
- its(:video_owner) { should eq '2152699' }
146
- its(:video_id) { should eq '168591741' }
147
- its(:url) { should eq video_url }
148
- its(:embed_url) { should eq embed_url }
149
- its(:embed_code) { should eq embed_code }
150
- its(:title) { should eq video_title }
151
- its(:description) { should start_with description_text }
152
- its(:keywords) { should be_nil }
153
- its(:duration) { should eq 299 }
154
- its(:width) { should eq 960 }
155
- its(:height) { should eq 540 }
156
- its(:view_count) { should be > 10 }
157
- its(:author) { should eq(author).or(eq(author_alt)) }
158
- its(:author_thumbnail) { should eq author_thumbnail }
159
- its(:author_url) { should eq 'https://vk.com/lyanoi.kirill' }
160
- its(:thumbnail) { should be_nil }
161
- its(:thumbnail_small) { should eq thumbnail_small }
162
- end
163
-
164
- context 'with video video39576223_161598544', :vcr do
165
- subject { VideoInfo.new('https://vk.com/video39576223_161598544') }
166
-
167
- title_text = 'Harry Partridge - Skyrim (русская озвучка)'
168
- description_text = 'Тут могло быть описание'
169
- embed_url = '//vk.com/video_ext.php?oid=39576223&' \
170
- 'id=161598544&hash=f7140d579b7f53e4'
171
- embed_code = '<iframe src="//vk.com/video_ext.php?oid=39576223' \
172
- '&id=161598544&hash=f7140d579b7f53e4" frameborder="0"' \
173
- ' allowfullscreen="allowfullscreen"></iframe>'
174
-
175
- its(:provider) { should eq 'Vkontakte' }
176
- its(:video_owner) { should eq '39576223' }
177
- its(:video_id) { should eq '161598544' }
178
- its(:url) { should eq 'https://vk.com/video39576223_161598544' }
179
- its(:embed_url) { should eq embed_url }
180
- its(:embed_code) { should eq embed_code }
181
- its(:title) { should eq title_text }
182
- its(:description) { should eq description_text }
183
- its(:keywords) { should be_nil }
184
- its(:duration) { should eq 85 }
185
- its(:width) { should eq 960 }
186
- its(:height) { should eq 540 }
187
- its(:view_count) { should be > 10 }
188
- end
189
-
190
- context 'with video video-54799401_165822734', :vcr do
191
- subject { VideoInfo.new('http://vk.com/video-54799401_165822734') }
192
-
193
- its(:provider) { should eq 'Vkontakte' }
194
- its(:video_owner) { should eq '-54799401' }
195
- its(:video_id) { should eq '165822734' }
196
- its(:title) { should eq 'SpaceGlasses are the future of computing' }
197
- end
198
-
199
- context 'with valid video and connection timeout' do
200
- subject { VideoInfo.new('http://vk.com/video-54799401_165822734') }
201
-
202
- describe '#title' do
203
- before do
204
- stub_request(:any, /.*vk.com.*/).to_timeout
205
- end
206
-
207
- it 'raises VideoInfo::HttpError exception' do
208
- expect { subject.title }.to raise_error VideoInfo::HttpError
209
- end
210
- end
211
- end
212
-
213
- context 'with valid video and OpenURI::HTTPError exception' do
214
- subject { VideoInfo.new('http://vk.com/video-54799401_165822734') }
215
-
216
- describe '#title' do
217
- before do
218
- stub = stub_request(:any, /.*vk.com.*/)
219
- stub.to_raise(OpenURI::HTTPError.new('error', :nop))
220
- end
221
-
222
- it 'raises VideoInfo::HttpError exception' do
223
- expect { subject.title }.to raise_error VideoInfo::HttpError
224
- end
225
- end
226
- end
227
-
228
- context 'with video video3552522_171340713', :vcr do
229
- subject { VideoInfo.new('http://vk.com/video3552522_171340713') }
230
-
231
- embed_url = '//vk.com/video_ext.php?oid=3552522&id=171340713' \
232
- '&hash=9826caf9bf171494'
233
-
234
- its(:embed_url) { should eq embed_url }
235
- end
236
- end