video_info 2.6.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/unit_test.yml +39 -0
  3. data/.gitignore +0 -1
  4. data/.rubocop.yml +242 -1
  5. data/CONTRIBUTING.md +11 -0
  6. data/Gemfile +1 -1
  7. data/Guardfile +2 -2
  8. data/README.md +29 -7
  9. data/lib/video_info.rb +25 -28
  10. data/lib/video_info/provider.rb +25 -12
  11. data/lib/video_info/providers/dailymotion.rb +19 -3
  12. data/lib/video_info/providers/vimeo.rb +3 -3
  13. data/lib/video_info/providers/vimeo_api.rb +20 -11
  14. data/lib/video_info/providers/vimeo_scraper.rb +93 -23
  15. data/lib/video_info/providers/wistia.rb +2 -1
  16. data/lib/video_info/providers/youtube.rb +16 -2
  17. data/lib/video_info/providers/youtube_api.rb +42 -8
  18. data/lib/video_info/providers/youtube_scraper.rb +64 -31
  19. data/lib/video_info/providers/youtubeplaylist.rb +5 -2
  20. data/lib/video_info/providers/youtubeplaylist_api.rb +22 -1
  21. data/lib/video_info/providers/youtubeplaylist_scraper.rb +16 -3
  22. data/lib/video_info/version.rb +1 -1
  23. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +82 -0
  24. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +87 -0
  25. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +91 -0
  26. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +91 -0
  27. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +91 -0
  28. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +91 -0
  29. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +91 -0
  30. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +91 -0
  31. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +91 -0
  32. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_21_1.yml +91 -0
  33. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +91 -0
  34. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +91 -0
  35. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +91 -0
  36. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +91 -0
  37. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_22_1.yml +91 -0
  38. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +151 -0
  39. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +68 -0
  40. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +127 -0
  41. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +70 -0
  42. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +158 -0
  43. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +68 -0
  44. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +130 -0
  45. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +130 -0
  46. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +132 -0
  47. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +130 -0
  48. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +128 -0
  49. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +131 -0
  50. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +130 -0
  51. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +131 -0
  52. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +128 -0
  53. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +129 -0
  54. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +129 -0
  55. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +129 -0
  56. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +130 -0
  57. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +129 -0
  58. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +129 -0
  59. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_20_1.yml +158 -0
  60. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_20_1.yml +80 -0
  61. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_19_1.yml +158 -0
  62. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_19_1.yml +85 -0
  63. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_21_1.yml +159 -0
  64. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_21_1.yml +80 -0
  65. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +240 -0
  66. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +160 -0
  67. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +80 -0
  68. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +158 -0
  69. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +85 -0
  70. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +158 -0
  71. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +80 -0
  72. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +240 -0
  73. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_18_1.yml +236 -0
  74. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_18_1.yml +82 -0
  75. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +236 -0
  76. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +82 -0
  77. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +235 -0
  78. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +84 -0
  79. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +236 -0
  80. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +84 -0
  81. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +159 -0
  82. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +85 -0
  83. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_22_1.yml +158 -0
  84. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_22_1.yml +84 -0
  85. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +156 -0
  86. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +82 -0
  87. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/1_12_1_1.yml +234 -0
  88. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/2_12_1_1.yml +78 -0
  89. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/1_12_2_1.yml +233 -0
  90. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/2_12_2_1.yml +78 -0
  91. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/1_12_3_1.yml +235 -0
  92. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/2_12_3_1.yml +73 -0
  93. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/1_12_4_1.yml +234 -0
  94. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/2_12_4_1.yml +77 -0
  95. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +75 -0
  96. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +79 -0
  97. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +85 -0
  98. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +85 -0
  99. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +86 -0
  100. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +86 -0
  101. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +85 -0
  102. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +86 -0
  103. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +86 -0
  104. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +85 -0
  105. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +87 -0
  106. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_15_1.yml +87 -0
  107. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +87 -0
  108. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +87 -0
  109. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +85 -0
  110. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +85 -0
  111. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +87 -0
  112. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +59 -0
  113. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +114 -0
  114. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +59 -0
  115. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +114 -0
  116. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +59 -0
  117. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +114 -0
  118. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +59 -0
  119. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +114 -0
  120. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +59 -0
  121. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +114 -0
  122. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +59 -0
  123. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +114 -0
  124. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_18_1.yml +59 -0
  125. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_18_1.yml +114 -0
  126. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +59 -0
  127. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +187 -0
  128. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +59 -0
  129. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +114 -0
  130. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_a_video_without_description/_description/1_1_1_1.yml +59 -0
  131. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +249 -0
  132. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +59 -0
  133. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +187 -0
  134. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +59 -0
  135. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +187 -0
  136. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +59 -0
  137. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +187 -0
  138. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +59 -0
  139. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +187 -0
  140. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_17_1.yml +59 -0
  141. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_17_1.yml +187 -0
  142. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +115 -0
  143. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +187 -0
  144. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +115 -0
  145. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +335 -0
  146. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +59 -0
  147. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +335 -0
  148. 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
  149. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +243 -0
  150. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +60 -0
  151. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +187 -0
  152. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +59 -0
  153. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +187 -0
  154. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +59 -0
  155. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +187 -0
  156. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +59 -0
  157. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +187 -0
  158. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_21_1.yml +59 -0
  159. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_21_1.yml +187 -0
  160. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +120 -0
  161. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +154 -0
  162. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +154 -0
  163. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_21_1.yml +165 -0
  164. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_22_1.yml +274 -0
  165. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_23_1.yml +274 -0
  166. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +165 -0
  167. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +165 -0
  168. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_18_1.yml +165 -0
  169. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +165 -0
  170. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large_2x/1_3_16_1.yml +165 -0
  171. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_maxres/1_3_17_1.yml +165 -0
  172. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +165 -0
  173. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +165 -0
  174. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +165 -0
  175. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +112 -0
  176. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +114 -0
  177. data/spec/lib/video_info/provider_spec.rb +42 -22
  178. data/spec/lib/video_info/providers/dailymotion_spec.rb +75 -27
  179. data/spec/lib/video_info/providers/vimeo_spec.rb +270 -174
  180. data/spec/lib/video_info/providers/wistia_spec.rb +59 -20
  181. data/spec/lib/video_info/providers/youtube_playlist_spec.rb +97 -41
  182. data/spec/lib/video_info/providers/youtube_scraper_spec.rb +14 -0
  183. data/spec/lib/video_info/providers/youtube_spec.rb +441 -384
  184. data/spec/lib/video_info_spec.rb +27 -25
  185. data/spec/spec_helper.rb +6 -1
  186. data/tmp/rspec_guard_result +25 -0
  187. data/video_info.gemspec +11 -14
  188. metadata +358 -100
  189. data/.travis.yml +0 -13
  190. data/foo.txt +0 -33
  191. data/lib/video_info/providers/vkontakte.rb +0 -170
  192. data/spec/lib/video_info/providers/vimeo_api_spec.rb +0 -242
  193. data/spec/lib/video_info/providers/vkontakte_spec.rb +0 -173
  194. data/spec/lib/video_info/providers/youtube_api_spec.rb +0 -476
  195. data/spec/lib/video_info/providers/youtube_playlist_api_spec.rb +0 -187
@@ -0,0 +1,274 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=youtube_api_key_123&part=snippet
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - VideoInfo/2.8.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=UTF-8
23
+ Vary:
24
+ - Origin
25
+ - Referer
26
+ - X-Origin
27
+ Date:
28
+ - Tue, 27 Oct 2020 18:42:19 GMT
29
+ Server:
30
+ - scaffolding on HTTPServer2
31
+ Cache-Control:
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
+ "kind": "youtube#playlistListResponse",
50
+ "etag": "Lhu7Yb-FnqA_Lgnvh7voheGMJR4",
51
+ "pageInfo": {
52
+ "totalResults": 1,
53
+ "resultsPerPage": 5
54
+ },
55
+ "items": [
56
+ {
57
+ "kind": "youtube#playlist",
58
+ "etag": "oJ_SZduyFDBmOtZabEKVkpJHohI",
59
+ "id": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
60
+ "snippet": {
61
+ "publishedAt": "2013-08-09T05:09:51Z",
62
+ "channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
63
+ "title": "YouTube Policy and Copyright",
64
+ "description": "Learn more about copyright basics, flagging, and the YouTube community.",
65
+ "thumbnails": {
66
+ "default": {
67
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/default.jpg",
68
+ "width": 120,
69
+ "height": 90
70
+ },
71
+ "medium": {
72
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/mqdefault.jpg",
73
+ "width": 320,
74
+ "height": 180
75
+ },
76
+ "high": {
77
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/hqdefault.jpg",
78
+ "width": 480,
79
+ "height": 360
80
+ },
81
+ "standard": {
82
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/sddefault.jpg",
83
+ "width": 640,
84
+ "height": 480
85
+ },
86
+ "maxres": {
87
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/maxresdefault.jpg",
88
+ "width": 1280,
89
+ "height": 720
90
+ }
91
+ },
92
+ "channelTitle": "TeamYouTube [Help]",
93
+ "defaultLanguage": "en",
94
+ "localized": {
95
+ "title": "YouTube Policy and Copyright",
96
+ "description": "Learn more about copyright basics, flagging, and the YouTube community."
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ http_version:
103
+ recorded_at: Tue, 27 Oct 2020 18:42:19 GMT
104
+ - request:
105
+ method: get
106
+ uri: https://www.googleapis.com/youtube/v3/channels?id=UCMDQxm7cUx3yXkfeHa5zJIQ&key=youtube_api_key_123&part=snippet
107
+ body:
108
+ encoding: US-ASCII
109
+ string: ''
110
+ headers:
111
+ Accept-Encoding:
112
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
113
+ Accept:
114
+ - "*/*"
115
+ User-Agent:
116
+ - Ruby
117
+ response:
118
+ status:
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ Content-Type:
123
+ - application/json; charset=UTF-8
124
+ Vary:
125
+ - Origin
126
+ - Referer
127
+ - X-Origin
128
+ Date:
129
+ - Tue, 27 Oct 2020 18:42:20 GMT
130
+ Server:
131
+ - scaffolding on HTTPServer2
132
+ Cache-Control:
133
+ - private
134
+ X-Xss-Protection:
135
+ - '0'
136
+ X-Frame-Options:
137
+ - SAMEORIGIN
138
+ X-Content-Type-Options:
139
+ - nosniff
140
+ Alt-Svc:
141
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
142
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
143
+ ma=2592000; v="46,43"
144
+ Transfer-Encoding:
145
+ - chunked
146
+ body:
147
+ encoding: ASCII-8BIT
148
+ string: !binary |-
149
+ ewogICJraW5kIjogInlvdXR1YmUjY2hhbm5lbExpc3RSZXNwb25zZSIsCiAgImV0YWciOiAiYjJuQXRCaEg5YXprVGZWRW1NdDNDZXF3ckxFIiwKICAicGFnZUluZm8iOiB7CiAgICAidG90YWxSZXN1bHRzIjogMSwKICAgICJyZXN1bHRzUGVyUGFnZSI6IDUKICB9LAogICJpdGVtcyI6IFsKICAgIHsKICAgICAgImtpbmQiOiAieW91dHViZSNjaGFubmVsIiwKICAgICAgImV0YWciOiAiNF9PQ3JYM3lDTW9qeTFWY1RLa1VuUWszRG1nIiwKICAgICAgImlkIjogIlVDTURReG03Y1V4M3lYa2ZlSGE1ekpJUSIsCiAgICAgICJzbmlwcGV0IjogewogICAgICAgICJ0aXRsZSI6ICJUZWFtWW91VHViZSBbSGVscF0iLAogICAgICAgICJkZXNjcmlwdGlvbiI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iAgICAgICAgICAgICJ1cmwiOiAiaHR0cHM6Ly95dDMuZ2dwaHQuY29tL2EvQUFUWEFKd3lFdjB1RXlrM0pMc2tqTGlVQ3FTVnpzR21wV3cyaWNMZkJPQnpXZz1zODAwLWMtay1jMHgwMGZmZmZmZi1uby1yaiIsCiAgICAgICAgICAgICJ3aWR0aCI6IDgwMCwKICAgICAgICAgICAgImhlaWdodCI6IDgwMAogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgImRlZmF1bHRMYW5ndWFnZSI6ICJlbiIsCiAgICAgICAgImxvY2FsaXplZCI6IHsKICAgICAgICAgICJ0aXRsZSI6ICJUZWFtWW91VHViZSBbSGVscF0iLAogICAgICAgICAgImRlc2NyaXB0aW9uIjogIldlJ3JlIGhlcmUgdG8gaGVscC4gSWYgeW91J3JlIGxvb2tpbmcgZm9yIHByb2R1Y3QgdXBkYXRlcywgYW5zd2Vycywgb3IgaG93LXRv4oCZcywgeW91J3ZlIGNvbWUgdG8gdGhlIHJpZ2h0IHBsYWNlISBIYXZlIHF1ZXN0aW9ucz8gTGVhdmUgdGhlbSBpbiBvdXIgdmlkZW8gY29tbWVudHMgYW5kIHdl4oCZbGwgZ2V0IHRvIGFzIG1hbnkgYXMgd2UgY2FuIVxuXG5JZiB5b3UncmUgbG9va2luZyB0byBncm93IHlvdXIgY2hhbm5lbCBhcyBhIFlvdVR1YmVyLCBjaGVjayBvdXQgeW91dHViZS5jb20veW91dHViZWNyZWF0b3JzLiIKICAgICAgICB9LAogICAgICAgICJjb3VudHJ5IjogIlVTIgogICAgICB9CiAgICB9CiAgXQp9Cg==
150
+ http_version:
151
+ recorded_at: Tue, 27 Oct 2020 18:42:20 GMT
152
+ - request:
153
+ method: get
154
+ uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=%3Cyoutube_api_key_123%3E&part=snippet
155
+ body:
156
+ encoding: US-ASCII
157
+ string: ''
158
+ headers:
159
+ User-Agent:
160
+ - VideoInfo/2.8.0
161
+ Accept-Encoding:
162
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
163
+ Accept:
164
+ - "*/*"
165
+ response:
166
+ status:
167
+ code: 400
168
+ message: Bad Request
169
+ headers:
170
+ Vary:
171
+ - Origin
172
+ - Referer
173
+ - X-Origin
174
+ Content-Type:
175
+ - application/json; charset=UTF-8
176
+ Date:
177
+ - Tue, 27 Oct 2020 18:44:54 GMT
178
+ Server:
179
+ - scaffolding on HTTPServer2
180
+ Cache-Control:
181
+ - private
182
+ X-Xss-Protection:
183
+ - '0'
184
+ X-Frame-Options:
185
+ - SAMEORIGIN
186
+ X-Content-Type-Options:
187
+ - nosniff
188
+ Alt-Svc:
189
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
190
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
191
+ ma=2592000; v="46,43"
192
+ Transfer-Encoding:
193
+ - chunked
194
+ body:
195
+ encoding: ASCII-8BIT
196
+ string: |
197
+ {
198
+ "error": {
199
+ "code": 400,
200
+ "message": "API key not valid. Please pass a valid API key.",
201
+ "errors": [
202
+ {
203
+ "message": "API key not valid. Please pass a valid API key.",
204
+ "domain": "global",
205
+ "reason": "badRequest"
206
+ }
207
+ ],
208
+ "status": "INVALID_ARGUMENT"
209
+ }
210
+ }
211
+ http_version:
212
+ recorded_at: Tue, 27 Oct 2020 18:44:54 GMT
213
+ - request:
214
+ method: get
215
+ uri: https://www.googleapis.com/youtube/v3/channels?id=&key=%3Cyoutube_api_key_123%3E&part=snippet
216
+ body:
217
+ encoding: US-ASCII
218
+ string: ''
219
+ headers:
220
+ Accept-Encoding:
221
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
222
+ Accept:
223
+ - "*/*"
224
+ User-Agent:
225
+ - Ruby
226
+ response:
227
+ status:
228
+ code: 400
229
+ message: Bad Request
230
+ headers:
231
+ Vary:
232
+ - Origin
233
+ - Referer
234
+ - X-Origin
235
+ Content-Type:
236
+ - application/json; charset=UTF-8
237
+ Date:
238
+ - Tue, 27 Oct 2020 18:44:54 GMT
239
+ Server:
240
+ - scaffolding on HTTPServer2
241
+ Cache-Control:
242
+ - private
243
+ X-Xss-Protection:
244
+ - '0'
245
+ X-Frame-Options:
246
+ - SAMEORIGIN
247
+ X-Content-Type-Options:
248
+ - nosniff
249
+ Alt-Svc:
250
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
251
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
252
+ ma=2592000; v="46,43"
253
+ Transfer-Encoding:
254
+ - chunked
255
+ body:
256
+ encoding: ASCII-8BIT
257
+ string: |
258
+ {
259
+ "error": {
260
+ "code": 400,
261
+ "message": "API key not valid. Please pass a valid API key.",
262
+ "errors": [
263
+ {
264
+ "message": "API key not valid. Please pass a valid API key.",
265
+ "domain": "global",
266
+ "reason": "badRequest"
267
+ }
268
+ ],
269
+ "status": "INVALID_ARGUMENT"
270
+ }
271
+ }
272
+ http_version:
273
+ recorded_at: Tue, 27 Oct 2020 18:44:54 GMT
274
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,274 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=youtube_api_key_123&part=snippet
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - VideoInfo/2.8.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=UTF-8
23
+ Vary:
24
+ - Origin
25
+ - Referer
26
+ - X-Origin
27
+ Date:
28
+ - Tue, 27 Oct 2020 18:42:20 GMT
29
+ Server:
30
+ - scaffolding on HTTPServer2
31
+ Cache-Control:
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
+ "kind": "youtube#playlistListResponse",
50
+ "etag": "Lhu7Yb-FnqA_Lgnvh7voheGMJR4",
51
+ "pageInfo": {
52
+ "totalResults": 1,
53
+ "resultsPerPage": 5
54
+ },
55
+ "items": [
56
+ {
57
+ "kind": "youtube#playlist",
58
+ "etag": "oJ_SZduyFDBmOtZabEKVkpJHohI",
59
+ "id": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
60
+ "snippet": {
61
+ "publishedAt": "2013-08-09T05:09:51Z",
62
+ "channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
63
+ "title": "YouTube Policy and Copyright",
64
+ "description": "Learn more about copyright basics, flagging, and the YouTube community.",
65
+ "thumbnails": {
66
+ "default": {
67
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/default.jpg",
68
+ "width": 120,
69
+ "height": 90
70
+ },
71
+ "medium": {
72
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/mqdefault.jpg",
73
+ "width": 320,
74
+ "height": 180
75
+ },
76
+ "high": {
77
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/hqdefault.jpg",
78
+ "width": 480,
79
+ "height": 360
80
+ },
81
+ "standard": {
82
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/sddefault.jpg",
83
+ "width": 640,
84
+ "height": 480
85
+ },
86
+ "maxres": {
87
+ "url": "https://i.ytimg.com/vi/9g2U12SsRns/maxresdefault.jpg",
88
+ "width": 1280,
89
+ "height": 720
90
+ }
91
+ },
92
+ "channelTitle": "TeamYouTube [Help]",
93
+ "defaultLanguage": "en",
94
+ "localized": {
95
+ "title": "YouTube Policy and Copyright",
96
+ "description": "Learn more about copyright basics, flagging, and the YouTube community."
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ http_version:
103
+ recorded_at: Tue, 27 Oct 2020 18:42:20 GMT
104
+ - request:
105
+ method: get
106
+ uri: https://www.googleapis.com/youtube/v3/channels?id=UCMDQxm7cUx3yXkfeHa5zJIQ&key=youtube_api_key_123&part=snippet
107
+ body:
108
+ encoding: US-ASCII
109
+ string: ''
110
+ headers:
111
+ Accept-Encoding:
112
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
113
+ Accept:
114
+ - "*/*"
115
+ User-Agent:
116
+ - Ruby
117
+ response:
118
+ status:
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ Content-Type:
123
+ - application/json; charset=UTF-8
124
+ Vary:
125
+ - Origin
126
+ - Referer
127
+ - X-Origin
128
+ Date:
129
+ - Tue, 27 Oct 2020 18:42:20 GMT
130
+ Server:
131
+ - scaffolding on HTTPServer2
132
+ Cache-Control:
133
+ - private
134
+ X-Xss-Protection:
135
+ - '0'
136
+ X-Frame-Options:
137
+ - SAMEORIGIN
138
+ X-Content-Type-Options:
139
+ - nosniff
140
+ Alt-Svc:
141
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
142
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
143
+ ma=2592000; v="46,43"
144
+ Transfer-Encoding:
145
+ - chunked
146
+ body:
147
+ encoding: ASCII-8BIT
148
+ string: !binary |-
149
+ ewog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uZCB3ZeKAmWxsIGdldCB0byBhcyBtYW55IGFzIHdlIGNhbiFcblxuSWYgeW91J3JlIGxvb2tpbmcgdG8gZ3JvdyB5b3VyIGNoYW5uZWwgYXMgYSBZb3VUdWJlciwgY2hlY2sgb3V0IHlvdXR1YmUuY29tL3lvdXR1YmVjcmVhdG9ycy4iCiAgICAgICAgfSwKICAgICAgICAiY291bnRyeSI6ICJVUyIKICAgICAgfQogICAgfQogIF0KfQo=
150
+ http_version:
151
+ recorded_at: Tue, 27 Oct 2020 18:42:20 GMT
152
+ - request:
153
+ method: get
154
+ uri: https://www.googleapis.com/youtube/v3/playlists?id=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr&key=%3Cyoutube_api_key_123%3E&part=snippet
155
+ body:
156
+ encoding: US-ASCII
157
+ string: ''
158
+ headers:
159
+ User-Agent:
160
+ - VideoInfo/2.8.0
161
+ Accept-Encoding:
162
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
163
+ Accept:
164
+ - "*/*"
165
+ response:
166
+ status:
167
+ code: 400
168
+ message: Bad Request
169
+ headers:
170
+ Vary:
171
+ - Origin
172
+ - Referer
173
+ - X-Origin
174
+ Content-Type:
175
+ - application/json; charset=UTF-8
176
+ Date:
177
+ - Tue, 27 Oct 2020 18:44:54 GMT
178
+ Server:
179
+ - scaffolding on HTTPServer2
180
+ Cache-Control:
181
+ - private
182
+ X-Xss-Protection:
183
+ - '0'
184
+ X-Frame-Options:
185
+ - SAMEORIGIN
186
+ X-Content-Type-Options:
187
+ - nosniff
188
+ Alt-Svc:
189
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
190
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
191
+ ma=2592000; v="46,43"
192
+ Transfer-Encoding:
193
+ - chunked
194
+ body:
195
+ encoding: ASCII-8BIT
196
+ string: |
197
+ {
198
+ "error": {
199
+ "code": 400,
200
+ "message": "API key not valid. Please pass a valid API key.",
201
+ "errors": [
202
+ {
203
+ "message": "API key not valid. Please pass a valid API key.",
204
+ "domain": "global",
205
+ "reason": "badRequest"
206
+ }
207
+ ],
208
+ "status": "INVALID_ARGUMENT"
209
+ }
210
+ }
211
+ http_version:
212
+ recorded_at: Tue, 27 Oct 2020 18:44:54 GMT
213
+ - request:
214
+ method: get
215
+ uri: https://www.googleapis.com/youtube/v3/channels?id=&key=%3Cyoutube_api_key_123%3E&part=snippet
216
+ body:
217
+ encoding: US-ASCII
218
+ string: ''
219
+ headers:
220
+ Accept-Encoding:
221
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
222
+ Accept:
223
+ - "*/*"
224
+ User-Agent:
225
+ - Ruby
226
+ response:
227
+ status:
228
+ code: 400
229
+ message: Bad Request
230
+ headers:
231
+ Vary:
232
+ - Origin
233
+ - Referer
234
+ - X-Origin
235
+ Content-Type:
236
+ - application/json; charset=UTF-8
237
+ Date:
238
+ - Tue, 27 Oct 2020 18:44:54 GMT
239
+ Server:
240
+ - scaffolding on HTTPServer2
241
+ Cache-Control:
242
+ - private
243
+ X-Xss-Protection:
244
+ - '0'
245
+ X-Frame-Options:
246
+ - SAMEORIGIN
247
+ X-Content-Type-Options:
248
+ - nosniff
249
+ Alt-Svc:
250
+ - h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443";
251
+ ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443";
252
+ ma=2592000; v="46,43"
253
+ Transfer-Encoding:
254
+ - chunked
255
+ body:
256
+ encoding: ASCII-8BIT
257
+ string: |
258
+ {
259
+ "error": {
260
+ "code": 400,
261
+ "message": "API key not valid. Please pass a valid API key.",
262
+ "errors": [
263
+ {
264
+ "message": "API key not valid. Please pass a valid API key.",
265
+ "domain": "global",
266
+ "reason": "badRequest"
267
+ }
268
+ ],
269
+ "status": "INVALID_ARGUMENT"
270
+ }
271
+ }
272
+ http_version:
273
+ recorded_at: Tue, 27 Oct 2020 18:44:54 GMT
274
+ recorded_with: VCR 3.0.3