video_info 2.6.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/unit_test.yml +39 -0
  3. data/Guardfile +1 -1
  4. data/README.md +10 -21
  5. data/lib/video_info.rb +5 -4
  6. data/lib/video_info/provider.rb +17 -2
  7. data/lib/video_info/providers/dailymotion.rb +13 -0
  8. data/lib/video_info/providers/vimeo_api.rb +12 -12
  9. data/lib/video_info/providers/vimeo_scraper.rb +66 -16
  10. data/lib/video_info/providers/youtube.rb +12 -0
  11. data/lib/video_info/providers/youtube_api.rb +12 -13
  12. data/lib/video_info/providers/youtube_scraper.rb +44 -25
  13. data/lib/video_info/providers/youtubeplaylist_api.rb +15 -1
  14. data/lib/video_info/version.rb +1 -1
  15. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +29 -36
  16. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +29 -34
  17. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/{_description → _author}/1_3_7_1.yml +35 -39
  18. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/{_duration → _author_thumbnail}/1_3_9_1.yml +35 -39
  19. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/{_keywords → _author_url}/1_3_8_1.yml +35 -39
  20. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +35 -39
  21. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/{_thumbnail_large/1_3_15_1.yml → _description/1_3_10_1.yml} +35 -39
  22. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +91 -0
  23. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +91 -0
  24. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_21_1.yml +91 -0
  25. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +91 -0
  26. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +91 -0
  27. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/{_view_count → _thumbnail_small}/1_3_16_1.yml +35 -39
  28. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +34 -38
  29. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_22_1.yml +91 -0
  30. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +39 -852
  31. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +30 -21
  32. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +45 -854
  33. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +30 -21
  34. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +45 -2579
  35. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +28 -79
  36. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +130 -0
  37. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +130 -0
  38. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +132 -0
  39. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +130 -0
  40. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +128 -0
  41. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +131 -0
  42. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +130 -0
  43. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +131 -0
  44. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +128 -0
  45. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +129 -0
  46. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +129 -0
  47. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +129 -0
  48. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +130 -0
  49. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +129 -0
  50. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +129 -0
  51. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_20_1.yml +158 -0
  52. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_20_1.yml +80 -0
  53. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_19_1.yml +158 -0
  54. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_19_1.yml +85 -0
  55. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_21_1.yml +159 -0
  56. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_21_1.yml +80 -0
  57. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +143 -1498
  58. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +45 -1487
  59. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +42 -30
  60. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +98 -1470
  61. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +45 -28
  62. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +100 -1471
  63. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +42 -30
  64. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +144 -1499
  65. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_18_1.yml +236 -0
  66. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_18_1.yml +82 -0
  67. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +176 -1470
  68. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +43 -29
  69. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +177 -1472
  70. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +43 -27
  71. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +176 -1470
  72. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +43 -27
  73. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +44 -1487
  74. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +45 -28
  75. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_22_1.yml +158 -0
  76. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_22_1.yml +84 -0
  77. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +99 -1473
  78. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +43 -29
  79. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/1_12_1_1.yml +234 -0
  80. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/2_12_1_1.yml +78 -0
  81. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/1_12_2_1.yml +233 -0
  82. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/2_12_2_1.yml +78 -0
  83. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/1_12_3_1.yml +235 -0
  84. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/2_12_3_1.yml +73 -0
  85. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/1_12_4_1.yml +234 -0
  86. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/2_12_4_1.yml +77 -0
  87. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +29 -25
  88. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +31 -25
  89. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +37 -32
  90. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +37 -32
  91. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +37 -31
  92. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +37 -31
  93. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +37 -32
  94. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +37 -31
  95. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +37 -31
  96. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +36 -31
  97. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +36 -29
  98. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_15_1.yml +87 -0
  99. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +36 -29
  100. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +36 -29
  101. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +36 -31
  102. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +36 -31
  103. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +36 -29
  104. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +25 -482
  105. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +82 -24
  106. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +24 -484
  107. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +82 -24
  108. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +22 -484
  109. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +82 -24
  110. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +23 -483
  111. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +82 -24
  112. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +26 -486
  113. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +82 -24
  114. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +26 -486
  115. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +82 -24
  116. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_18_1.yml +59 -0
  117. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_18_1.yml +114 -0
  118. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +25 -3896
  119. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +153 -93
  120. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +25 -544
  121. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +80 -83
  122. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_a_video_without_description/_description/1_1_1_1.yml +59 -0
  123. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +180 -3843
  124. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +20 -3968
  125. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +153 -93
  126. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +23 -3946
  127. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +153 -93
  128. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +25 -3950
  129. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +153 -93
  130. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +23 -3910
  131. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +153 -93
  132. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_17_1.yml +59 -0
  133. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_17_1.yml +187 -0
  134. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +60 -3951
  135. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +153 -93
  136. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +58 -3970
  137. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +272 -149
  138. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +22 -4043
  139. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +272 -149
  140. 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
  141. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +175 -3914
  142. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +25 -3957
  143. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +153 -93
  144. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +24 -3926
  145. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +153 -93
  146. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +24 -3893
  147. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +153 -93
  148. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +23 -3938
  149. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +153 -93
  150. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_21_1.yml +59 -0
  151. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_21_1.yml +187 -0
  152. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +88 -30
  153. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +121 -63
  154. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +121 -63
  155. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_21_1.yml +165 -0
  156. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_22_1.yml +274 -0
  157. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_23_1.yml +274 -0
  158. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +132 -74
  159. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +132 -74
  160. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_18_1.yml +165 -0
  161. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +132 -74
  162. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large_2x/1_3_16_1.yml +165 -0
  163. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_maxres/1_3_17_1.yml +165 -0
  164. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +132 -74
  165. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +132 -74
  166. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +132 -74
  167. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +79 -234
  168. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +82 -24
  169. data/spec/lib/video_info/providers/dailymotion_spec.rb +34 -4
  170. data/spec/lib/video_info/providers/vimeo_spec.rb +77 -16
  171. data/spec/lib/video_info/providers/wistia_spec.rb +26 -8
  172. data/spec/lib/video_info/providers/youtube_playlist_spec.rb +186 -176
  173. data/spec/lib/video_info/providers/youtube_scraper_spec.rb +14 -0
  174. data/spec/lib/video_info/providers/youtube_spec.rb +71 -29
  175. data/spec/lib/video_info_spec.rb +0 -4
  176. data/spec/spec_helper.rb +6 -1
  177. data/tmp/rspec_guard_result +25 -0
  178. data/video_info.gemspec +8 -8
  179. metadata +143 -222
  180. data/.travis.yml +0 -14
  181. data/lib/video_info/providers/vkontakte.rb +0 -194
  182. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_14_1.yml +0 -95
  183. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_13_1.yml +0 -95
  184. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_17_1.yml +0 -1530
  185. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_17_1.yml +0 -68
  186. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_16_1.yml +0 -1530
  187. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_16_1.yml +0 -68
  188. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_18_1.yml +0 -1529
  189. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_18_1.yml +0 -68
  190. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_19_1.yml +0 -1530
  191. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_19_1.yml +0 -68
  192. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/1_3_17_1.yml +0 -2559
  193. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/2_3_17_1.yml +0 -159
  194. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/1_3_16_1.yml +0 -2559
  195. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/2_3_16_1.yml +0 -159
  196. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/1_3_18_1.yml +0 -2559
  197. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/2_3_18_1.yml +0 -159
  198. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/should_have_correct_upload_date.yml +0 -2714
  199. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/1_3_7_1.yml +0 -2692
  200. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/2_3_7_1.yml +0 -159
  201. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/1_3_9_1.yml +0 -2829
  202. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/2_3_9_1.yml +0 -159
  203. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/1_3_11_1.yml +0 -2828
  204. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/2_3_11_1.yml +0 -159
  205. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/should_return_a_string_list_of_keywords.yml +0 -2716
  206. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/1_3_15_1.yml +0 -2560
  207. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/2_3_15_1.yml +0 -159
  208. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/1_3_14_1.yml +0 -2558
  209. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/2_3_14_1.yml +0 -159
  210. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/1_3_13_1.yml +0 -2558
  211. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/2_3_13_1.yml +0 -159
  212. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/1_3_6_1.yml +0 -2961
  213. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/2_3_6_1.yml +0 -159
  214. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_19_1.yml +0 -2560
  215. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/2_3_19_1.yml +0 -159
  216. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/1_3_10_1.yml +0 -2560
  217. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/2_3_10_1.yml +0 -159
  218. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +0 -2996
  219. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +0 -46
  220. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +0 -865
  221. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +0 -666
  222. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect_to_main_page_for_auth/available_/1_2_5_1_1.yml +0 -46
  223. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +0 -2118
  224. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author/1_5_14_1.yml +0 -518
  225. 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 -519
  226. 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 -520
  227. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +0 -518
  228. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +0 -517
  229. 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 -517
  230. 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 -519
  231. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +0 -517
  232. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +0 -517
  233. 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 -521
  234. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +0 -517
  235. 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 -399
  236. 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 -399
  237. 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 -399
  238. 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 -399
  239. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +0 -682
  240. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +0 -501
  241. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/1_6_8_1.yml +0 -449
  242. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/1_6_10_1.yml +0 -449
  243. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/1_6_6_1.yml +0 -449
  244. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/1_6_5_1.yml +0 -449
  245. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/1_6_12_1.yml +0 -449
  246. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/1_6_7_1.yml +0 -449
  247. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/1_6_13_1.yml +0 -449
  248. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/1_6_11_1.yml +0 -449
  249. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +0 -527
  250. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +0 -527
  251. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +0 -527
  252. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +0 -527
  253. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_15_1.yml +0 -516
  254. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_15_1.yml +0 -56
  255. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +0 -3948
  256. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +0 -127
  257. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_19_1.yml +0 -3950
  258. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_19_1.yml +0 -127
  259. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +0 -62
  260. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +0 -96
  261. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +0 -96
  262. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_18_1.yml +0 -107
  263. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/2_3_18_1.yml +0 -107
  264. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_19_1.yml +0 -193
  265. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/2_3_19_1.yml +0 -193
  266. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_20_1.yml +0 -193
  267. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/2_3_20_1.yml +0 -193
  268. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +0 -107
  269. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +0 -107
  270. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +0 -107
  271. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +0 -107
  272. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +0 -107
  273. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +0 -107
  274. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +0 -56
  275. data/spec/lib/video_info/providers/vkontakte_spec.rb +0 -242
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet&playlistId=PL0E8117603D70E10A
5
+ uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=youtube_api_key_123&maxResults=50&part=snippet&playlistId=PL0E8117603D70E10A
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - VideoInfo/2.6.0
11
+ - VideoInfo/2.8.0
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
@@ -18,39 +18,97 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Expires:
22
- - Thu, 05 May 2016 01:01:55 GMT
21
+ Content-Type:
22
+ - application/json; charset=UTF-8
23
+ Vary:
24
+ - Origin
25
+ - Referer
26
+ - X-Origin
23
27
  Date:
24
- - Thu, 05 May 2016 01:01:55 GMT
28
+ - Tue, 27 Oct 2020 18:42:21 GMT
29
+ Server:
30
+ - scaffolding on HTTPServer2
25
31
  Cache-Control:
26
- - private, max-age=0, must-revalidate, no-transform
27
- Etag:
28
- - '"kiOs9cZLH2FUp6r6KJ8eyq_LIOk/ewwRz0VbTYpp2EGbOkvZ5M_1mbo"'
32
+ - private
33
+ X-Xss-Protection:
34
+ - '0'
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Alt-Svc:
40
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
41
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
42
+ ma=2592000; v="46,43"
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: ASCII-8BIT
47
+ string: |
48
+ {
49
+ "items": []
50
+ }
51
+ http_version:
52
+ recorded_at: Tue, 27 Oct 2020 18:42:21 GMT
53
+ - request:
54
+ method: get
55
+ uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=%3Cyoutube_api_key_123%3E&maxResults=50&part=snippet&playlistId=PL0E8117603D70E10A
56
+ body:
57
+ encoding: US-ASCII
58
+ string: ''
59
+ headers:
60
+ User-Agent:
61
+ - VideoInfo/2.8.0
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - "*/*"
66
+ response:
67
+ status:
68
+ code: 400
69
+ message: Bad Request
70
+ headers:
29
71
  Vary:
30
72
  - Origin
73
+ - Referer
31
74
  - X-Origin
32
75
  Content-Type:
33
76
  - application/json; charset=UTF-8
34
- X-Content-Type-Options:
35
- - nosniff
77
+ Date:
78
+ - Tue, 27 Oct 2020 18:44:54 GMT
79
+ Server:
80
+ - scaffolding on HTTPServer2
81
+ Cache-Control:
82
+ - private
83
+ X-Xss-Protection:
84
+ - '0'
36
85
  X-Frame-Options:
37
86
  - SAMEORIGIN
38
- X-Xss-Protection:
39
- - 1; mode=block
40
- Content-Length:
41
- - '17'
42
- Server:
43
- - GSE
44
- Alternate-Protocol:
45
- - 443:quic
87
+ X-Content-Type-Options:
88
+ - nosniff
46
89
  Alt-Svc:
47
- - quic=":443"; ma=2592000; v="33,32,31,30,29,28,27,26,25"
90
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
91
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
92
+ ma=2592000; v="46,43"
93
+ Transfer-Encoding:
94
+ - chunked
48
95
  body:
49
- encoding: UTF-8
96
+ encoding: ASCII-8BIT
50
97
  string: |
51
98
  {
52
- "items": []
99
+ "error": {
100
+ "code": 400,
101
+ "message": "API key not valid. Please pass a valid API key.",
102
+ "errors": [
103
+ {
104
+ "message": "API key not valid. Please pass a valid API key.",
105
+ "domain": "global",
106
+ "reason": "badRequest"
107
+ }
108
+ ],
109
+ "status": "INVALID_ARGUMENT"
110
+ }
53
111
  }
54
- http_version:
55
- recorded_at: Thu, 05 May 2016 01:01:55 GMT
56
- recorded_with: VCR 3.0.1
112
+ http_version:
113
+ recorded_at: Tue, 27 Oct 2020 18:44:55 GMT
114
+ recorded_with: VCR 3.0.3
@@ -23,7 +23,7 @@ describe VideoInfo::Providers::Dailymotion do
23
23
 
24
24
  describe '#available?' do
25
25
  context 'with valid video', :vcr do
26
- subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3') }
26
+ subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3'.freeze) }
27
27
 
28
28
  describe '#available?' do
29
29
  subject { super().available? }
@@ -76,6 +76,21 @@ describe VideoInfo::Providers::Dailymotion do
76
76
  it { is_expected.to eq 'Mario Kart (Rémi Gaillard)' }
77
77
  end
78
78
 
79
+ describe '#author' do
80
+ subject { super().author }
81
+ it { is_expected.to eq 'Rémi Gaillard' }
82
+ end
83
+
84
+ describe '#author_url' do
85
+ subject { super().author_url }
86
+ it { is_expected.to eq 'https://www.dailymotion.com/nqtv' }
87
+ end
88
+
89
+ describe '#author_thumbnail' do
90
+ subject { super().author_thumbnail }
91
+ it { is_expected.to match /https:\/\/s[12].dmcdn.net\/u\/US931VO3V-24wNr1\/60x60/ }
92
+ end
93
+
79
94
  describe '#description' do
80
95
  subject { super().description }
81
96
  description_text = 'Super Rémi Kart est un jeu vidéo de course ' \
@@ -116,17 +131,32 @@ describe VideoInfo::Providers::Dailymotion do
116
131
 
117
132
  describe '#thumbnail_small' do
118
133
  subject { super().thumbnail_small }
119
- it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x60-kbf.jpg' }
134
+ it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59OF6TK6\/x60/ }
120
135
  end
121
136
 
122
137
  describe '#thumbnail_medium' do
123
138
  subject { super().thumbnail_medium }
124
- it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x240-b83.jpg' }
139
+ it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59Vm42lt\/x240/ }
125
140
  end
126
141
 
127
142
  describe '#thumbnail_large' do
128
143
  subject { super().thumbnail_large }
129
- it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x720-YcV.jpg' }
144
+ it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59VyFzJt\/x720/ }
145
+ end
146
+
147
+ describe '#thumbnail_large_2x' do
148
+ subject { super().thumbnail_large_2x }
149
+ it { is_expected.to be_nil }
150
+ end
151
+
152
+ describe '#thumbnail_maxres' do
153
+ subject { super().thumbnail_maxres }
154
+ it { is_expected.to be_nil }
155
+ end
156
+
157
+ describe '#thumbnail' do
158
+ subject { super().thumbnail }
159
+ it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59VyFzJt\/x720/ }
130
160
  end
131
161
 
132
162
  describe '#view_count' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
- [nil, '6b66b015a3504793b4f541d878f46ff6'].each do |api_key|
4
- describe VideoInfo::Providers::Vimeo do
3
+ [nil, ENV["VIMEO_ACCESS_TOKEN"] || 'vimeo_access_token'].each do |api_key|
4
+ describe VideoInfo::Providers::Vimeo, :vcr do
5
5
  before(:all) do
6
6
  VideoInfo.provider_api_keys = { vimeo: api_key }
7
7
  end
@@ -47,15 +47,15 @@ require 'spec_helper'
47
47
  end
48
48
 
49
49
  describe '#available?' do
50
- context 'with valid video', :vcr do
51
- subject { VideoInfo.new('http://vimeo.com/98605382') }
50
+ context 'with valid video' do
51
+ subject { VideoInfo.new('http://vimeo.com/98605382'.freeze) }
52
52
 
53
53
  describe '#available?' do
54
54
  it { is_expected.to be_available }
55
55
  end
56
56
  end
57
57
 
58
- context "with 'this video does not exist' video", :vcr do
58
+ context "with 'this video does not exist' video" do
59
59
  subject { VideoInfo.new('http://vimeo.com/59312311') }
60
60
 
61
61
  describe '#available?' do
@@ -63,7 +63,7 @@ require 'spec_helper'
63
63
  end
64
64
  end
65
65
 
66
- context "with 'password required' video", :vcr do
66
+ context "with 'password required' video" do
67
67
  subject { VideoInfo.new('http://vimeo.com/74636562') }
68
68
 
69
69
  describe '#available?' do
@@ -72,7 +72,7 @@ require 'spec_helper'
72
72
  end
73
73
  end
74
74
 
75
- context 'with video 136971428', :vcr do
75
+ context 'with video 136971428' do
76
76
  subject { VideoInfo.new('https://vimeo.com/136971428') }
77
77
 
78
78
  describe '#provider' do
@@ -164,9 +164,36 @@ require 'spec_helper'
164
164
  it { is_expected.to eq thumbnail_url }
165
165
  end
166
166
 
167
+ describe '#thumbnail_large_2x' do
168
+ subject { super().thumbnail_large_2x }
169
+ it { is_expected.to be_nil }
170
+ end
171
+
172
+ describe '#thumbnail_maxres' do
173
+ subject { super().thumbnail_maxres }
174
+ it { is_expected.to be_nil }
175
+ end
176
+
177
+ describe '#thumbnail' do
178
+ subject { super().thumbnail }
179
+ thumbnail_url = 'https://i.vimeocdn.com/video/531688239_640.jpg'
180
+ it { is_expected.to eq thumbnail_url }
181
+ end
182
+
167
183
  describe '#author_thumbnail' do
168
184
  subject { super().author_thumbnail }
169
- thumbnail_url = 'https://i.vimeocdn.com/portrait/327118_75x75.jpg'
185
+
186
+ #
187
+ # For some reason, the scraper returns an image URL without
188
+ # a file extension. This will likely change in the future.
189
+ #
190
+
191
+ thumbnail_url = 'https://i.vimeocdn.com/portrait/14790276_75x75'
192
+
193
+ if api_key
194
+ thumbnail_url += '.jpg'
195
+ end
196
+
170
197
  it { is_expected.to eq thumbnail_url }
171
198
  end
172
199
 
@@ -186,7 +213,7 @@ require 'spec_helper'
186
213
  end
187
214
  end
188
215
 
189
- context 'with video 898029 and url_attributes', :vcr do
216
+ context 'with video 898029 and url_attributes' do
190
217
  subject { VideoInfo.new('http://www.vimeo.com/898029') }
191
218
 
192
219
  it 'should add URL attribute' do
@@ -196,7 +223,7 @@ require 'spec_helper'
196
223
  end
197
224
  end
198
225
 
199
- context 'with video 898029 and iframe_attributes', :vcr do
226
+ context 'with video 898029 and iframe_attributes' do
200
227
  subject { VideoInfo.new('http://www.vimeo.com/898029') }
201
228
 
202
229
  it 'should have proper dimensions' do
@@ -207,7 +234,7 @@ require 'spec_helper'
207
234
  end
208
235
  end
209
236
 
210
- context 'with video 898029 in /group/ url', :vcr do
237
+ context 'with video 898029 in /group/ url' do
211
238
  subject { VideoInfo.new('http://vimeo.com/groups/1234/videos/898029') }
212
239
 
213
240
  describe '#provider' do
@@ -221,7 +248,7 @@ require 'spec_helper'
221
248
  end
222
249
  end
223
250
 
224
- context 'with video 898029 in /group/ url', :vcr do
251
+ context 'with video 898029 in /group/ url' do
225
252
  subject { VideoInfo.new('http://player.vimeo.com/video/898029') }
226
253
 
227
254
  describe '#provider' do
@@ -235,7 +262,7 @@ require 'spec_helper'
235
262
  end
236
263
  end
237
264
 
238
- context 'with video 898029 in text', :vcr do
265
+ context 'with video 898029 in text' do
239
266
  video_url_in_text = '<a href="http://www.vimeo.com/898029">' \
240
267
  'http://www.vimeo.com/898029</a>'
241
268
  subject { VideoInfo.new(video_url_in_text) }
@@ -251,14 +278,14 @@ require 'spec_helper'
251
278
  end
252
279
  end
253
280
 
254
- context 'with video 101677664 in /ondemand/ url', :vcr do
281
+ context 'with video 101677664 in /ondemand/ url' do
255
282
  subject { VideoInfo.new('https://vimeo.com/ondemand/less/101677664') }
256
283
 
257
284
  its(:provider) { should eq 'Vimeo' }
258
285
  its(:video_id) { should eq '101677664' }
259
286
  end
260
287
 
261
- context 'with video 111431415 in /channels/*/ url', :vcr do
288
+ context 'with video 111431415 in /channels/*/ url' do
262
289
  video_url = 'https://vimeo.com/channels/some_channel1/111431415'
263
290
  subject { VideoInfo.new(video_url) }
264
291
 
@@ -266,12 +293,46 @@ require 'spec_helper'
266
293
  its(:video_id) { should eq '111431415' }
267
294
  end
268
295
 
269
- context 'with video 126641548 in /user*/review/126641548/* url', :vcr do
296
+ context 'with video 126641548 in /user*/review/126641548/* url' do
270
297
  video_url = 'http://www.vimeo.com/user39798190/review/126641548/8a56234e32'
271
298
  subject { VideoInfo.new(video_url) }
272
299
 
273
300
  its(:provider) { should eq 'Vimeo' }
274
301
  its(:video_id) { should eq '126641548' }
275
302
  end
303
+
304
+ context 'with video 141349194' do
305
+ video_url = 'https://vimeo.com/141349194'
306
+ subject { VideoInfo.new(video_url) }
307
+
308
+ its(:thumbnail) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
309
+ its(:thumbnail_large) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
310
+ its(:thumbnail_medium) { should eq 'https://i.vimeocdn.com/video/538320894_200x150.jpg' }
311
+ its(:thumbnail_small) { should eq 'https://i.vimeocdn.com/video/538320894_100x75.jpg' }
312
+
313
+ end
314
+
315
+ context 'with unavailable video' do
316
+ if api_key.nil?
317
+ video_url = 'https://vimeo.com/0812455'
318
+ subject { VideoInfo.new(video_url) }
319
+
320
+ its(:available?) { should be false }
321
+ its(:author) { should be nil }
322
+ its(:author_thumbnail) { should be nil }
323
+ its(:author_url) { should be nil }
324
+ its(:title) { should be nil }
325
+ its(:description) { should be nil }
326
+ its(:date) { should be nil }
327
+ its(:duration) { should be nil }
328
+ its(:keywords) { should be nil }
329
+ its(:height) { should be nil }
330
+ its(:width) { should be nil }
331
+ its(:thumbnail_small) { should be nil }
332
+ its(:thumbnail_medium) { should be nil }
333
+ its(:thumbnail_large) { should be nil }
334
+ its(:view_count) { should be nil }
335
+ end
336
+ end
276
337
  end
277
338
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  require 'spec_helper'
3
3
 
4
- describe VideoInfo::Providers::Wistia do
4
+ describe VideoInfo::Providers::Wistia, :vcr do
5
5
  describe '.usable?' do
6
6
  subject { VideoInfo::Providers::Wistia.usable?(url) }
7
7
 
@@ -17,9 +17,9 @@ describe VideoInfo::Providers::Wistia do
17
17
  end
18
18
 
19
19
  describe '#available?' do
20
- context 'with valid video', :vcr do
20
+ context 'with valid video' do
21
21
  video_url = 'http://fast.wistia.net/embed/iframe/rs1me54mpw'
22
- subject { VideoInfo.new(video_url) }
22
+ subject { VideoInfo.new(video_url.freeze) }
23
23
 
24
24
  describe '#available?' do
25
25
  subject { super().available? }
@@ -27,7 +27,7 @@ describe VideoInfo::Providers::Wistia do
27
27
  end
28
28
  end
29
29
 
30
- context 'with invalid video', :vcr do
30
+ context 'with invalid video' do
31
31
  subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/no_video') }
32
32
 
33
33
  describe '#available?' do
@@ -37,7 +37,7 @@ describe VideoInfo::Providers::Wistia do
37
37
  end
38
38
  end
39
39
 
40
- context 'with video rs1me54mpw', :vcr do
40
+ context 'with video rs1me54mpw' do
41
41
  subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/rs1me54mpw') }
42
42
 
43
43
  describe '#provider' do
@@ -110,9 +110,27 @@ describe VideoInfo::Providers::Wistia do
110
110
  '?image_crop_resized=960x540'
111
111
  it { is_expected.to eq thumbnail_url }
112
112
  end
113
+
114
+ describe '#thumbnail_large_2x' do
115
+ subject { super().thumbnail_large_2x }
116
+ it { is_expected.to be_nil }
117
+ end
118
+
119
+ describe '#thumbnail_maxres' do
120
+ subject { super().thumbnail_maxres }
121
+ it { is_expected.to be_nil }
122
+ end
123
+
124
+ describe '#thumbnail' do
125
+ subject { super().thumbnail }
126
+ thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
127
+ 'dc005e6a7583a25c4b7c284c08afc42fb67fdb95.jpg' \
128
+ '?image_crop_resized=960x540'
129
+ it { is_expected.to eq thumbnail_url }
130
+ end
113
131
  end
114
132
 
115
- context 'with video pxonqr42is', :vcr do
133
+ context 'with video pxonqr42is' do
116
134
  subject { VideoInfo.new('http://fast.wistia.com/embed/medias/pxonqr42is') }
117
135
 
118
136
  describe '#provider' do
@@ -149,7 +167,7 @@ describe VideoInfo::Providers::Wistia do
149
167
 
150
168
  describe '#duration' do
151
169
  subject { super().duration }
152
- it { is_expected.to eq 250.0 }
170
+ it { is_expected.to eq 250.428 }
153
171
  end
154
172
 
155
173
  describe '#width' do
@@ -159,7 +177,7 @@ describe VideoInfo::Providers::Wistia do
159
177
 
160
178
  describe '#height' do
161
179
  subject { super().height }
162
- it { is_expected.to eq 568 }
180
+ it { is_expected.to eq 540 }
163
181
  end
164
182
 
165
183
  describe '#thumbnail_small' do