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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9564ba39bd175a28b2d3a012c7ae7f7b775ee9cfb48f9898b617ed90249cb5c
4
- data.tar.gz: b9352efff0df637e5b7003a16b10bcb7d74a04a7c30f679deff23b8668c536d7
3
+ metadata.gz: d284395b3e33312982e53c42752ddd128eddb4209e1302efd4d80d680e9340be
4
+ data.tar.gz: 2cbe0d15902de1afd0ae88ee88f8a98a319040870c772c0e187fb6a94c99d9e8
5
5
  SHA512:
6
- metadata.gz: 1e811d6b7a7f1331353ded5f0b043b4a6062186e7f39e2e9e91508b1ae9bb2cbe2b8a972f9187c53269334edf1618759b7dedc48a058fc010f21018ae1a0d804
7
- data.tar.gz: f98bbc307aa03a09a9b1e7c57ec9fc716cc847785481eb8d9491eb87de0fda3d277103dbbe88cb17d072598082ee30303484b38f5549a0ddf1349f764b32811e
6
+ metadata.gz: c08b7769cea3b02f17133c9f7c12ab880de56361296777d3220c7ece3b9c8285edf1eab67c36f193acc6d66d08b7e64352f70ce1ebbb0ed78e727f9ba967b1c3
7
+ data.tar.gz: ef0efee0d8a41dba4bbd4ccd980e728242603cce3d31d72362a8869ba219d327abd52422481a26974946789358c8b0e683667fecd06f0822fab23762561cf05f
@@ -0,0 +1,39 @@
1
+ name: Ruby Unit Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby: [ '2.5', '2.6', '2.7' ]
15
+
16
+ name: Ruby ${{ matrix.ruby }}
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - name: Cache gems
23
+ uses: actions/cache@v2
24
+ env:
25
+ cache-name: cache-gems
26
+ with:
27
+ path: vendor/bundle
28
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
29
+ restore-keys: |
30
+ ${{ runner.os }}-gems-
31
+ - name: Set bundle config path
32
+ run: |
33
+ bundle config path vendor/bundle
34
+ - name: Install dependencies
35
+ run: |
36
+ bundle install
37
+ - name: Ruby Unit tests
38
+ run: |
39
+ bundle exec rspec
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Guardfile
2
2
  # More info at http://github.com/guard/guard#readme
3
3
 
4
- guard 'rspec', keep_failed: false do
4
+ guard 'rspec', cmd: "bundle exec rspec" do
5
5
  watch('spec/spec_helper.rb') { 'spec' }
6
6
  watch(%r{lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
7
  watch(%r{spec/.+_spec\.rb})
data/README.md CHANGED
@@ -1,12 +1,10 @@
1
1
  # VideoInfo
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/video_info.svg)](http://badge.fury.io/rb/video_info) [![Build Status](https://travis-ci.org/thibaudgg/video_info.svg?branch=master)](https://travis-ci.org/thibaudgg/video_info) [![Code Climate](https://codeclimate.com/github/thibaudgg/video_info.svg)](https://codeclimate.com/github/thibaudgg/video_info) [![Coverage Status](https://coveralls.io/repos/thibaudgg/video_info/badge.svg?branch=master)](https://coveralls.io/r/thibaudgg/video_info) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
3
+ [![Gem Version](https://badge.fury.io/rb/video_info.svg)](http://badge.fury.io/rb/video_info) [![Build Status](https://github.com/thibaudgg/video_info/workflows/Ruby%20Unit%20Tests/badge.svg?branch=master)](https://github.com/thibaudgg/video_info/actions?query=workflow%3A%22Ruby+Unit+Tests%22) [![Code Climate](https://codeclimate.com/github/thibaudgg/video_info.svg)](https://codeclimate.com/github/thibaudgg/video_info) [![Coverage Status](https://coveralls.io/repos/thibaudgg/video_info/badge.svg?branch=master)](https://coveralls.io/r/thibaudgg/video_info) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
4
4
 
5
- :exclamation: VideoInfo is no more actively maintained, please [contact me](mailto:thibaud@thibaud.gg) if you're interested in helping.
5
+ Simple Ruby Gem to get video info from Dailymotion, Vimeo, Wistia and YouTube (with playlist).
6
6
 
7
- Simple Ruby Gem to get video info from Dailymotion, VK, Vimeo, Wistia and YouTube (with playlist).
8
-
9
- Tested against Ruby 2.3.0, 2.2.4, and the latest versions of JRuby & Rubinius.
7
+ Tested against Ruby 2.5.x, 2.6.x and 2.7.x.
10
8
 
11
9
  Features
12
10
  --------
@@ -34,6 +32,8 @@ Scrapers has been implemented for both Youtube and Vimeo. However, the Youtube s
34
32
 
35
33
  To get a Youtube API key, [follow the instructions here](https://developers.google.com/youtube/registering_an_application)
36
34
 
35
+ After generating a Youtube API key it is necessary to enable the YouTube Data API for the project which your API key was generated [enable Youtube Data API here](https://console.developers.google.com/apis/library/youtube.googleapis.com)
36
+
37
37
  To get a Vimeo API key, [follow the instructions here](https://developer.vimeo.com/api/start)
38
38
 
39
39
  To set the API keys, do the following:
@@ -91,19 +91,6 @@ video = VideoInfo.new("http://fast.wistia.com/embed/medias/pxonqr42is")
91
91
  # video.embed_url => '//fast.wistia.net/embed/iframe/pxonqr42is'
92
92
  # video.embed_code => "<iframe src='//fast.wistia.net/embed/iframe/pxonqr42is' frameborder='0'></iframe>"
93
93
 
94
- video = VideoInfo.new('http://vk.com/video39576223_108370515')
95
- # video.available? => true
96
- # video.provider => "Vkontakte"
97
- # video.video_id => "108370515"
98
- # video.author => "Alexander Maslov"
99
- # video.author_thumbnail => "https://pp.vk.me/c624521/v624521223/3c288/lVcVW7LNnrQ.jpg"
100
- # video.author_url => "https://vk.com/videos39576223"
101
- # video.title => "Я уточка)))))"
102
- # video.description => "это ВЗРЫВ МОЗГА!!!<br>Просто отвал башки..."
103
- # video.duration => 183 (in seconds)
104
- # video.embed_url => "//vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af"
105
- # video.embed_code => "<iframe src=\"//vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>"
106
-
107
94
  video = VideoInfo.new("http://www.youtube.com/watch?v=mZqGqE0D0n4")
108
95
  # video.available? => true
109
96
  # video.video_id => 'mZqGqE0D0n4'
@@ -187,9 +174,9 @@ Author
187
174
  Maintainers
188
175
  -----------
189
176
 
190
- [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](https://twitter.com/thibaudgg))
191
-
192
- [Vincent Heuken](https://github.com/vheuken) ([@vheuken](https://github.com/vheuken))
177
+ - [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](https://twitter.com/thibaudgg))
178
+ - [Vincent Heuken](https://github.com/vheuken) ([@vheuken](https://github.com/vheuken))
179
+ - [João Vieira](https://github.com/joaocv3) ([@joaocv3](https://github.com/joaocv3))
193
180
 
194
181
  Contributors
195
182
  ------------
@@ -10,8 +10,7 @@ class VideoInfo
10
10
  class HttpError < Error; end
11
11
 
12
12
  class << self
13
- attr_writer :logger
14
- attr_accessor :disable_providers, :provider_api_keys
13
+ attr_writer :logger, :disable_providers
15
14
 
16
15
  def disable_providers
17
16
  @disable_providers || []
@@ -38,7 +37,7 @@ class VideoInfo
38
37
  extend Forwardable
39
38
 
40
39
  PROVIDERS = %w[
41
- Dailymotion Vkontakte Wistia
40
+ Dailymotion Wistia
42
41
  Vimeo Youtube YoutubePlaylist
43
42
  ].freeze
44
43
  PROVIDERS.each { |p| require "video_info/providers/#{p.downcase}" }
@@ -4,7 +4,8 @@ require 'uri'
4
4
 
5
5
  class VideoInfo
6
6
  class Provider
7
- attr_accessor :url, :options, :iframe_attributes, :video_id, :data
7
+ attr_accessor :url, :options, :iframe_attributes, :video_id
8
+ attr_writer :data
8
9
 
9
10
  def initialize(url, options = {})
10
11
  @options = _clean_options(options)
@@ -109,7 +110,7 @@ class VideoInfo
109
110
  end
110
111
 
111
112
  def _set_data_from_api_impl(api_url)
112
- uri = open(api_url, options)
113
+ uri = URI.open(api_url, options)
113
114
  JSON.load(uri.read)
114
115
  end
115
116
 
@@ -122,12 +122,22 @@ class VideoInfo
122
122
 
123
123
  def view_count
124
124
  if available?
125
- json_info['interactionCount']
125
+ user_interaction_count(interaction_type: "http://schema.org/WatchAction")
126
126
  end
127
127
  end
128
128
 
129
129
  private
130
130
 
131
+ def user_interaction_count(interaction_type:)
132
+ interaction_statistic.find do |stat|
133
+ stat["interactionType"] == interaction_type
134
+ end["userInteractionCount"]
135
+ end
136
+
137
+ def interaction_statistic
138
+ json_info["interactionStatistic"]
139
+ end
140
+
131
141
  def json_info
132
142
  @json_info ||= JSON.parse(data.css('script').detect do |n|
133
143
  type = n.attr('type')
@@ -175,7 +185,7 @@ class VideoInfo
175
185
  end
176
186
 
177
187
  def _set_data_from_api_impl(api_url)
178
- Oga.parse_html(open(api_url.to_s).read)
188
+ Oga.parse_html(URI.open(api_url.to_s).read)
179
189
 
180
190
  rescue OpenURI::HTTPError
181
191
  nil
@@ -66,6 +66,10 @@ class VideoInfo
66
66
  def _default_url_attributes
67
67
  {}
68
68
  end
69
+
70
+ def resize_thumb(url, size)
71
+ url.gsub(/(https:\/\/yt3.ggpht.com\/.*\/.*=s)([0-9]*)(.*)/, "\\1#{size}\\3")
72
+ end
69
73
  end
70
74
  end
71
75
  end
@@ -83,7 +83,7 @@ class VideoInfo
83
83
 
84
84
  def _channel_info
85
85
  channel_url = _channel_api_url(_video_snippet['channelId'])
86
- @_channel_info ||= JSON.load(open(channel_url).read)
86
+ @_channel_info ||= JSON.load(URI.open(channel_url).read)
87
87
  end
88
88
 
89
89
  def _channel_snippet
@@ -5,8 +5,12 @@ require 'net_http_timeout_errors'
5
5
  class VideoInfo
6
6
  module Providers
7
7
  module YoutubeScraper
8
+ BASE_URL = "https://www.youtube.com"
9
+ CHANNEL_URL = "#{BASE_URL}/channel/"
10
+ THUMB_DEFAULT_SIZE = 88
11
+
8
12
  def available?
9
- data.css('div#unavailable-submessage').text.strip.empty?
13
+ !!title
10
14
  end
11
15
 
12
16
  def date
@@ -16,20 +20,25 @@ class VideoInfo
16
20
  end
17
21
 
18
22
  def author
19
- data.css('.yt-user-info')[0].css('a').text
23
+ meta_node_value(channel_meta_nodes, 'og:title')
20
24
  end
21
25
 
22
26
  def author_thumbnail
23
- data.css('.yt-thumb-clip')[0].css('img').attr('data-thumb')[0].value
27
+ image_hq_url = meta_node_value(channel_meta_nodes, 'og:image')
28
+
29
+ resize_thumb(image_hq_url, THUMB_DEFAULT_SIZE)
30
+ end
31
+
32
+ def channel_id
33
+ itemprop_node_value('channelId')
24
34
  end
25
35
 
26
36
  def author_url
27
- path = data.css('.yt-user-info')[0].css('a')[0].attr('href').value
28
- 'https://www.youtube.com' + path
37
+ URI.join(CHANNEL_URL, channel_id).to_s
29
38
  end
30
39
 
31
40
  def description
32
- meta_node_value('description')
41
+ meta_node_value(video_meta_nodes, 'og:description')
33
42
  end
34
43
 
35
44
  def duration
@@ -43,7 +52,9 @@ class VideoInfo
43
52
  end
44
53
 
45
54
  def keywords
46
- value = meta_node_value('keywords')
55
+ return unless available?
56
+
57
+ value = meta_node_value(video_meta_nodes, 'keywords')
47
58
 
48
59
  value.split(', ') if value
49
60
  end
@@ -53,35 +64,41 @@ class VideoInfo
53
64
  end
54
65
 
55
66
  def view_count
56
- data.css('div.watch-view-count').text.gsub(/\D/, '').to_i
67
+ itemprop_node_value('interactionCount').to_i
57
68
  end
58
69
 
59
70
  private
60
71
 
61
- def meta_nodes
62
- @meta_nodes ||= data.css('meta')
72
+ def video_meta_nodes
73
+ @video_meta_nodes ||= data.css('meta')
63
74
  end
64
75
 
65
- def meta_node_value(name)
66
- if available?
67
- node = meta_nodes.detect do |n|
68
- n.attr('name') && n.attr('name').value == name
69
- end
76
+ def channel_meta_nodes
77
+ @channel_meta_nodes ||= channel_data.css('meta')
78
+ end
70
79
 
71
- node && node.attr('content') && node.attr('content').value
80
+ def channel_data
81
+ @channel_data ||= Oga.parse_html(URI.open(author_url).read)
82
+ end
83
+
84
+ def meta_node_value(meta_nodes=video_meta_nodes, name)
85
+ node = meta_nodes.detect do |n|
86
+ n.attr('name')&.value == name || n.attr('property')&.value == name
72
87
  end
88
+
89
+ return unless node
90
+ node && node.attr('content') && node.attr('content').value
73
91
  end
74
92
 
75
93
  def itemprop_node_value(name)
76
- if available?
77
- node = meta_nodes.detect do |m|
78
- itemprop_attr = m.attr('itemprop')
94
+ node = video_meta_nodes.detect do |m|
95
+ itemprop_attr = m.attr('itemprop')
79
96
 
80
- itemprop_attr.value == name if itemprop_attr
81
- end
82
-
83
- node.attr('content').value
97
+ itemprop_attr.value == name if itemprop_attr
84
98
  end
99
+
100
+ return unless node
101
+ node.attr('content').value
85
102
  end
86
103
 
87
104
  def _set_data_from_api_impl(api_url)
@@ -89,9 +106,9 @@ class VideoInfo
89
106
  if url.include?('.com/v/')
90
107
  video_id = url.split('/v/')[1].split('?')[0]
91
108
  new_url = 'https://www.youtube.com/watch?v=' + video_id
92
- Oga.parse_html(open(new_url).read)
109
+ Oga.parse_html(URI.open(new_url).read)
93
110
  else
94
- Oga.parse_html(open(api_url).read)
111
+ Oga.parse_html(URI.open(api_url).read)
95
112
  end
96
113
  end
97
114
 
@@ -1,5 +1,7 @@
1
1
  class VideoInfo
2
2
  module YoutubePlaylistAPI
3
+ ITEMS_MAX_RESULTS = 50
4
+
3
5
  def available?
4
6
  !data['items'].empty?
5
7
  rescue VideoInfo::HttpError
@@ -28,6 +30,10 @@ class VideoInfo
28
30
  nil
29
31
  end
30
32
 
33
+ def thumbnail
34
+ thumbnail_small
35
+ end
36
+
31
37
  def thumbnail_small
32
38
  _video_snippet['thumbnails']['default']['url']
33
39
  end
@@ -40,6 +46,14 @@ class VideoInfo
40
46
  _video_snippet['thumbnails']['high']['url']
41
47
  end
42
48
 
49
+ def thumbnail_large_2x
50
+ _video_snippet['thumbnails']['standard']['url']
51
+ end
52
+
53
+ def thumbnail_maxres
54
+ _video_snippet['thumbnails']['maxres']['url']
55
+ end
56
+
43
57
  private
44
58
 
45
59
  def _playlist_entry
@@ -56,7 +70,7 @@ class VideoInfo
56
70
 
57
71
  def _playlist_items_api_path
58
72
  '/youtube/v3/playlistItems?part=snippet&' \
59
- "playlistId=#{playlist_id}&fields=items&key=#{api_key}"
73
+ "playlistId=#{playlist_id}&fields=items&maxResults=#{ITEMS_MAX_RESULTS}&key=#{api_key}"
60
74
  end
61
75
 
62
76
  def _playlist_items_api_url
@@ -1,3 +1,3 @@
1
1
  class VideoInfo
2
- VERSION = '2.8.0'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
@@ -18,12 +18,18 @@ http_interactions:
18
18
  code: 404
19
19
  message: Not Found
20
20
  headers:
21
+ Content-Security-Policy-Report-Only:
22
+ - 'default-src https: blob: wss: data: android-webview-video-poster: android-webview:
23
+ chrome-extension: safari-extension: ''unsafe-eval'' ''unsafe-inline''; report-uri
24
+ https://www.dailymotion.com/content_security_policy_report_uri'
21
25
  Server:
22
26
  - DMS/1.0.42
23
27
  X-Dm-Api-Object:
24
28
  - video
25
29
  X-Dm-Backnode:
26
- - web-292.adm.dc3.dailymotion.com:80
30
+ - web-118.adm.ix7.dailymotion.com:80
31
+ Vary:
32
+ - X-DM-SSL
27
33
  X-Dm-Api-Method:
28
34
  - info
29
35
  Cache-Control:
@@ -33,61 +39,44 @@ http_interactions:
33
39
  Access-Control-Expose-Headers:
34
40
  - Date, X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status, X-Served-By,
35
41
  X-DM-BackNode-Response-Time
42
+ Content-Security-Policy:
43
+ - upgrade-insecure-requests
44
+ Date:
45
+ - Tue, 27 Oct 2020 10:44:15 GMT
36
46
  X-Dm-Lb-Ip:
37
47
  - 195.8.215.129
38
48
  Expires:
39
49
  - Fri, 01 Jan 2010 05:00:00 GMT
40
50
  X-Dm-Lb-Name:
41
- - lb-10
51
+ - lb-03
42
52
  X-Dm-Random-Number:
43
- - '6415713'
53
+ - '8780791'
44
54
  Access-Control-Allow-Origin:
45
55
  - "*"
46
56
  X-Dm-Backnode-Response-Time:
47
- - '20'
57
+ - '31'
48
58
  X-Robots-Tag:
49
59
  - noindex
50
60
  X-Frame-Options:
51
61
  - DENY
62
+ Expect-Ct:
63
+ - max-age=0, report-uri="https://www.dailymotion.com/content_security_policy_report_uri"
64
+ X-Dm-Cache-Status:
65
+ - MISS
52
66
  Access-Control-Allow-Headers:
53
67
  - Content-Type, Authorization
54
68
  Access-Control-Allow-Methods:
55
69
  - GET, POST, DELETE
56
- X-Dm-Page:
57
- - us.rest.rest_api
58
- Via:
59
- - 1.1 varnish
60
- - 1.1 varnish
61
- Fastly-Debug-Digest:
62
- - d02f485cb1cc8d04e4842ee96ea037a8730d6692b5c01d60c144465f63874988
63
- Content-Length:
64
- - '206'
65
- Accept-Ranges:
66
- - bytes
67
- Date:
68
- - Mon, 27 Mar 2017 21:00:49 GMT
69
- Age:
70
- - '0'
71
- Connection:
72
- - keep-alive
73
- X-Served-By:
74
- - cache-fra1251-FRA, cache-lax8639-LAX
75
- X-Cache:
76
- - MISS, MISS
77
- X-Cache-Hits:
78
- - 0, 0
79
- X-Timer:
80
- - S1490648449.314252,VS0,VE179
81
- Vary:
82
- - X-DM-EC-Geo-Country
83
- X-Dm-Cache-Status:
84
- - MISS
70
+ Referrer-Policy:
71
+ - no-referrer-when-downgrade
85
72
  X-Dm-Edge:
86
- - Fastly
73
+ - DMParis
74
+ Content-Length:
75
+ - '265'
87
76
  body:
88
77
  encoding: UTF-8
89
78
  string: '{"error":{"more_info":"https:\/\/developer.dailymotion.com\/api#error-codes","code":404,"message":"Can''t
90
- find object video for `id'' parameter","type":"not_found","error_data":{"reason":"object_not_found"}}}'
91
- http_version:
92
- recorded_at: Mon, 27 Mar 2017 21:00:49 GMT
79
+ find object video for `id'' parameter","type":"not_found","error_data":{"reason":"object_not_found","object_type":"video","object_id":"inValIdiD","param":"id"}}}'
80
+ http_version:
81
+ recorded_at: Tue, 27 Oct 2020 10:44:15 GMT
93
82
  recorded_with: VCR 3.0.3