video_info 2.6.1 → 2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -2
  3. data/README.md +2 -2
  4. data/lib/video_info.rb +2 -1
  5. data/lib/video_info/provider.rb +6 -0
  6. data/lib/video_info/providers/dailymotion.rb +13 -0
  7. data/lib/video_info/providers/vimeo_api.rb +12 -12
  8. data/lib/video_info/providers/vimeo_scraper.rb +55 -15
  9. data/lib/video_info/providers/vkontakte.rb +42 -24
  10. data/lib/video_info/providers/youtube.rb +4 -0
  11. data/lib/video_info/version.rb +1 -1
  12. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_This_video_does_not_exist_or_has_been_deleted_/_available_/1_2_2_1_1.yml +84 -0
  13. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +13 -9
  14. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +13 -9
  15. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +1716 -0
  16. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +1195 -0
  17. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +1532 -0
  18. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/1_3_12_1.yml +92 -0
  19. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +1143 -10
  20. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +1195 -0
  21. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_7_1.yml +11 -11
  22. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_8_1.yml +280 -0
  23. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_9_1.yml +189 -0
  24. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_10_1.yml +280 -0
  25. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_11_1.yml +189 -0
  26. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +1195 -0
  27. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_9_1.yml +12 -12
  28. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_10_1.yml +189 -0
  29. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +1195 -0
  30. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_8_1.yml +12 -12
  31. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_9_1.yml +280 -0
  32. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_16_1.yml +95 -0
  33. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_17_1.yml +280 -0
  34. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_18_1.yml +189 -0
  35. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_19_1.yml +951 -0
  36. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_15_1.yml +12 -12
  37. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_16_1.yml +280 -0
  38. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_17_1.yml +189 -0
  39. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +951 -0
  40. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_14_1.yml +12 -12
  41. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_15_1.yml +280 -0
  42. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_16_1.yml +189 -0
  43. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +951 -0
  44. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_13_1.yml +12 -12
  45. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_14_1.yml +280 -0
  46. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_15_1.yml +189 -0
  47. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +951 -0
  48. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +1632 -11
  49. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_16_1.yml +13 -16
  50. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_17_1.yml +95 -0
  51. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_18_1.yml +280 -0
  52. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_19_1.yml +189 -0
  53. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_20_1.yml +951 -0
  54. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +837 -683
  55. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +17 -11
  56. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +1280 -809
  57. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +14 -8
  58. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +1584 -2512
  59. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +15 -67
  60. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_12_2_1.yml +1405 -0
  61. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +1406 -0
  62. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_12_3_1.yml +1674 -0
  63. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +1409 -0
  64. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_12_4_1.yml +1674 -0
  65. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +1407 -0
  66. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_12_1_1.yml +1404 -0
  67. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +1409 -0
  68. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_12_7_1.yml +1404 -0
  69. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +1408 -0
  70. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_12_6_1.yml +1406 -0
  71. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +1409 -0
  72. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_12_8_1.yml +1405 -0
  73. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +1406 -0
  74. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_12_10_1.yml +1405 -0
  75. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +1409 -0
  76. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_12_9_1.yml +1675 -0
  77. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +1408 -0
  78. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_12_14_1.yml +1404 -0
  79. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +1409 -0
  80. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_12_13_1.yml +1406 -0
  81. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +1407 -0
  82. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_12_12_1.yml +1405 -0
  83. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +1410 -0
  84. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_12_5_1.yml +1405 -0
  85. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +1408 -0
  86. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_12_15_1.yml +1674 -0
  87. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +1409 -0
  88. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_12_11_1.yml +1405 -0
  89. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +1409 -0
  90. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_18_1.yml +1931 -0
  91. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_18_1.yml +79 -0
  92. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_17_1.yml +1931 -0
  93. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_17_1.yml +79 -0
  94. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_19_1.yml +1931 -0
  95. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_19_1.yml +79 -0
  96. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +1863 -1451
  97. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +1780 -1451
  98. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +22 -11
  99. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +1842 -1441
  100. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +22 -11
  101. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +1769 -1367
  102. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +22 -11
  103. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +1863 -1451
  104. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_16_1.yml +2003 -0
  105. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_16_1.yml +79 -0
  106. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +1914 -1441
  107. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +22 -11
  108. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +1914 -1441
  109. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +22 -11
  110. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +1914 -1441
  111. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +22 -11
  112. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +1780 -1451
  113. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +22 -11
  114. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_20_1.yml +1931 -0
  115. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_20_1.yml +79 -0
  116. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +1842 -1441
  117. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +22 -11
  118. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/1_12_1_1.yml +1994 -0
  119. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/2_12_1_1.yml +222 -0
  120. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/1_12_2_1.yml +1994 -0
  121. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/2_12_2_1.yml +222 -0
  122. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/1_12_3_1.yml +1994 -0
  123. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/2_12_3_1.yml +222 -0
  124. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/1_12_4_1.yml +1994 -0
  125. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/2_12_4_1.yml +222 -0
  126. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/1_3_17_1.yml +1408 -2382
  127. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/1_3_16_1.yml +1736 -2380
  128. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/1_3_12_1.yml +1585 -0
  129. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/1_3_7_1.yml +1580 -2435
  130. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/1_3_9_1.yml +1731 -2645
  131. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/1_3_11_1.yml +1591 -2582
  132. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/1_3_8_1.yml +1915 -0
  133. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/1_3_15_1.yml +1736 -2381
  134. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/1_3_14_1.yml +1408 -2381
  135. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/1_3_13_1.yml +1736 -2379
  136. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/1_3_6_1.yml +1515 -2639
  137. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_18_1.yml +73 -0
  138. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/1_3_10_1.yml +1988 -2381
  139. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +61 -0
  140. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +61 -0
  141. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_date/1_3_12_1.yml +63 -0
  142. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_description/1_3_7_1.yml +63 -0
  143. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_duration/1_3_9_1.yml +63 -0
  144. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_height/1_3_11_1.yml +63 -0
  145. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_keywords/1_3_8_1.yml +63 -0
  146. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_large/1_3_15_1.yml +63 -0
  147. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_medium/1_3_14_1.yml +63 -0
  148. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_small/1_3_13_1.yml +63 -0
  149. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_title/1_3_6_1.yml +63 -0
  150. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_videos/1_3_16_1.yml +148 -0
  151. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_view_count/1_3_17_1.yml +63 -0
  152. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_width/1_3_10_1.yml +63 -0
  153. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +4160 -2907
  154. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +14 -10
  155. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +509 -716
  156. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +1057 -553
  157. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect_to_main_page_for_auth/available_/1_2_5_1_1.yml +38262 -6
  158. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +3183 -2025
  159. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author/1_5_14_1.yml +996 -480
  160. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_thumbnail/1_5_15_1.yml +993 -481
  161. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_url/1_5_16_1.yml +997 -483
  162. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +993 -480
  163. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +993 -478
  164. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_code/1_5_6_1.yml +990 -477
  165. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_url/1_5_5_1.yml +998 -482
  166. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +993 -478
  167. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/thumbnail_small/1_5_18_1.yml +1032 -0
  168. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +994 -479
  169. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/view_count/1_5_13_1.yml +991 -483
  170. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +993 -478
  171. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/author/1_3_7_1.yml +935 -361
  172. 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 +936 -362
  173. 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 +936 -362
  174. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/title/1_3_4_1.yml +937 -362
  175. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +452 -0
  176. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +452 -0
  177. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_code/1_5_6_1.yml +451 -0
  178. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_url/1_5_5_1.yml +450 -0
  179. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +450 -0
  180. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/keywords/1_5_9_1.yml +451 -0
  181. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +452 -0
  182. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/view_count/1_5_13_1.yml +451 -0
  183. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +451 -0
  184. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +1027 -644
  185. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +964 -462
  186. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/1_6_8_1.yml +10 -413
  187. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/1_6_10_1.yml +10 -413
  188. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/1_6_6_1.yml +10 -413
  189. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/1_6_5_1.yml +10 -413
  190. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/1_6_12_1.yml +10 -413
  191. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/keywords/1_6_9_1.yml +438 -0
  192. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/1_6_7_1.yml +10 -413
  193. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/1_6_13_1.yml +10 -413
  194. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/1_6_11_1.yml +10 -413
  195. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/description/1_6_8_1.yml +991 -0
  196. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/duration/1_6_10_1.yml +995 -0
  197. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_code/1_6_6_1.yml +993 -0
  198. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_url/1_6_5_1.yml +990 -0
  199. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/height/1_6_12_1.yml +994 -0
  200. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/title/1_6_7_1.yml +996 -0
  201. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/view_count/1_6_13_1.yml +995 -0
  202. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/width/1_6_11_1.yml +992 -0
  203. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +1009 -490
  204. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +1011 -490
  205. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +1012 -490
  206. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +1011 -490
  207. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +13 -17
  208. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +13 -17
  209. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +20 -23
  210. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +20 -23
  211. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +20 -23
  212. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +20 -23
  213. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +20 -23
  214. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +20 -23
  215. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +20 -23
  216. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +20 -23
  217. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +20 -23
  218. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_13_1.yml +77 -0
  219. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +20 -23
  220. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +20 -23
  221. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +20 -23
  222. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +20 -23
  223. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +20 -23
  224. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +217 -252
  225. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +7 -9
  226. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +225 -262
  227. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +7 -9
  228. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +233 -273
  229. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +7 -9
  230. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +225 -264
  231. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +7 -9
  232. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +241 -279
  233. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +7 -9
  234. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +250 -289
  235. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +7 -9
  236. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_16_1.yml +466 -0
  237. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_17_1.yml +483 -0
  238. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/{2_2_2_15_1.yml → 2_2_2_16_1.yml} +7 -7
  239. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_17_1.yml +54 -0
  240. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +3837 -3839
  241. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +9 -11
  242. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_available_/1_2_2_1_1.yml +56 -0
  243. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_available_/1_2_3_1_1.yml +508 -0
  244. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_date/1_2_2_11_1.yml +56 -0
  245. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_date/1_2_3_11_1.yml +510 -0
  246. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_description/1_2_2_8_1.yml +56 -0
  247. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/{with_unavailable_video/_view_count/1_2_2_15_1.yml → with_video_is_unavailable_video/_description/1_2_3_8_1.yml} +210 -217
  248. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_duration/1_2_2_10_1.yml +56 -0
  249. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_duration/1_2_3_10_1.yml +508 -0
  250. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_keywords/1_2_2_9_1.yml +56 -0
  251. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_keywords/1_2_3_9_1.yml +509 -0
  252. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_title/1_2_2_7_1.yml +56 -0
  253. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_title/1_2_3_7_1.yml +509 -0
  254. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_view_count/1_2_2_15_1.yml +56 -0
  255. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_view_count/1_2_3_15_1.yml +509 -0
  256. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_no_longer_available_due_to_a_copyright_claim_video/_available_/1_2_3_1_1.yml +108 -0
  257. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_no_longer_available_due_to_a_copyright_claim_video/_available_/1_2_4_1_1.yml +509 -0
  258. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +248 -342
  259. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +9 -72
  260. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/1_17_12_1.yml +119 -0
  261. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/1_18_12_1.yml +3681 -0
  262. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +3838 -3661
  263. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +3805 -3875
  264. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_18_7_1.yml +3686 -0
  265. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +9 -11
  266. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +3815 -3859
  267. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_18_9_1.yml +3687 -0
  268. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +9 -11
  269. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +3690 -3756
  270. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_18_8_1.yml +3680 -0
  271. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +9 -11
  272. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +3745 -3757
  273. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_18_6_1.yml +3700 -0
  274. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +9 -11
  275. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +3846 -3795
  276. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_18_16_1.yml +3630 -0
  277. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +9 -11
  278. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs_with_params/_title/1_19_1_1.yml +1243 -0
  279. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +3863 -3922
  280. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +9 -11
  281. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +3837 -3926
  282. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +20 -24
  283. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +3815 -3988
  284. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +20 -24
  285. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/1_3_12_1.yml +3826 -0
  286. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +3764 -3691
  287. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +3813 -3881
  288. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_7_1.yml +3832 -0
  289. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +9 -11
  290. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +3823 -3843
  291. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_9_1.yml +3838 -0
  292. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +9 -11
  293. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +3610 -3640
  294. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_8_1.yml +3854 -0
  295. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +9 -11
  296. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_6_1.yml +3832 -0
  297. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +3821 -3856
  298. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +9 -11
  299. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_16_1.yml +3682 -0
  300. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_19_1.yml +3715 -3800
  301. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_20_1.yml +3909 -0
  302. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_19_1.yml +10 -10
  303. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_20_1.yml +125 -0
  304. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +8 -10
  305. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +8 -10
  306. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +9 -11
  307. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +9 -11
  308. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +9 -11
  309. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +9 -11
  310. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL0E8117603D70E10A_in_embed_path/_videos/1_4_2_1.yml +56 -0
  311. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/{1_3_18_1.yml → 1_3_19_1.yml} +14 -16
  312. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/{2_3_18_1.yml → 2_3_19_1.yml} +14 -16
  313. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_url → _author_thumbnail}/1_3_20_1.yml +25 -29
  314. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_url → _author_thumbnail}/2_3_20_1.yml +25 -29
  315. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_thumbnail/1_3_19_1.yml → _author_url/1_3_21_1.yml} +25 -29
  316. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_thumbnail/2_3_19_1.yml → _author_url/2_3_21_1.yml} +25 -29
  317. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +14 -16
  318. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +14 -16
  319. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +14 -16
  320. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +14 -16
  321. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_16_1.yml +105 -0
  322. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/2_3_16_1.yml +105 -0
  323. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +14 -16
  324. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +14 -16
  325. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +14 -16
  326. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +14 -16
  327. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +14 -16
  328. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +14 -16
  329. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +14 -16
  330. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +14 -16
  331. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +15 -17
  332. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +7 -9
  333. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +7 -9
  334. data/spec/lib/video_info/providers/dailymotion_spec.rb +20 -0
  335. data/spec/lib/video_info/providers/vimeo_spec.rb +52 -1
  336. data/spec/lib/video_info/providers/vkontakte_spec.rb +31 -35
  337. data/spec/lib/video_info/providers/wistia_spec.rb +9 -1
  338. data/spec/lib/video_info/providers/youtube_playlist_spec.rb +10 -4
  339. data/spec/lib/video_info/providers/youtube_spec.rb +19 -1
  340. data/video_info.gemspec +3 -3
  341. metadata +330 -72
  342. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_17_1.yml +0 -1530
  343. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_17_1.yml +0 -68
  344. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_16_1.yml +0 -1530
  345. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_16_1.yml +0 -68
  346. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_18_1.yml +0 -1529
  347. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_18_1.yml +0 -68
  348. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_19_1.yml +0 -1530
  349. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_19_1.yml +0 -68
  350. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/2_3_17_1.yml +0 -159
  351. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/2_3_16_1.yml +0 -159
  352. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/1_3_18_1.yml +0 -2559
  353. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/2_3_18_1.yml +0 -159
  354. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/should_have_correct_upload_date.yml +0 -2714
  355. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/2_3_7_1.yml +0 -159
  356. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/2_3_9_1.yml +0 -159
  357. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/2_3_11_1.yml +0 -159
  358. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/should_return_a_string_list_of_keywords.yml +0 -2716
  359. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/2_3_15_1.yml +0 -159
  360. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/2_3_14_1.yml +0 -159
  361. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/2_3_13_1.yml +0 -159
  362. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/2_3_6_1.yml +0 -159
  363. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_19_1.yml +0 -2560
  364. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/2_3_19_1.yml +0 -159
  365. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/2_3_10_1.yml +0 -159
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18c94c937caae05276816dd3ed8ebe10df074b0b
4
- data.tar.gz: 61a33b65f281e74192fd355574616281b2ef2eb9
3
+ metadata.gz: c51bc4b80a2d491ea898adc7c0e57a77548ff93d
4
+ data.tar.gz: 5a1469a4e6817e37793097a3b68b7155bcb63eee
5
5
  SHA512:
6
- metadata.gz: 06a186d5c3fea88716f226090c797a82bbee92f1180683b5963fc96684d87c37b2eb6b25b18a2016eeca714023c7c86f3c0b558dce3dbc0881bad507c4917d07
7
- data.tar.gz: 99f37329ca0c12666afd6f58e9f68af88dc62fe8d62a67ec542a074569bdd1b311c1f21fd86a56eb20ee1a7be4f8a576ffdd372050f808b439e3d8bb9f69d201
6
+ metadata.gz: 7ae91bf616bda0bab0a23f0f2195f4cdc4cf712bb1738331b81344bb523f54ca19805cf9383a0395438458899472dba37b10cbddb6e5cd80e177132c225f91ee
7
+ data.tar.gz: 38c99abe24884a9b7be1e3ab49f31567fb012f3fb2c3750a7f12614850caee5fc59327f134320ab68f4678f35a78bba2ff4ed0e1ebf463ad1483889b1bbb30d0
@@ -3,10 +3,14 @@ sudo: false
3
3
  dist: trusty
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.2.4
7
- - 2.3.0
6
+ - 2.2.5
7
+ - 2.3.1
8
8
  - jruby-head
9
9
  - rbx-2
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: jruby-head
13
+ - rvm: rbx-2
10
14
  jdk:
11
15
  - oraclejdk8
12
16
  before_install:
data/README.md CHANGED
@@ -28,7 +28,7 @@ Usage
28
28
 
29
29
  Youtube and Vimeo have recently updated their APIs to require API keys.
30
30
 
31
- Scrapers has been implemented for both Youtube and Vimeo. However, the Youtube scraper can only get the date the video was posted, while the API is able to get the date and the exact time the video was posted. You may also wish to use the API to protect against potential HTML changes that could break the scrapesr.
31
+ Scrapers has been implemented for both Youtube and Vimeo. However, the Youtube scraper can only get the date the video was posted, while the API is able to get the date and the exact time the video was posted. You may also wish to use the API to protect against potential HTML changes that could break the scrapers.
32
32
 
33
33
  To get a Youtube API key, [follow the instructions here](https://developers.google.com/youtube/registering_an_application)
34
34
 
@@ -161,7 +161,7 @@ You can also include an `iframe_attributes` or `url_attributes` hash to the `emb
161
161
  VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4').embed_code(iframe_attributes: { width: 800, height: 600, 'data-key' => 'value' })
162
162
  => '<iframe src="//www.youtube.com/embed/mZqGqE0D0n4" frameborder="0" allowfullscreen="allowfullscreen" width="800" height="600" data-key="value"></iframe>'
163
163
 
164
- 'VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4').embed_code(url_attributes: { autoplay: 1 })
164
+ VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4').embed_code(url_attributes: { autoplay: 1 })
165
165
  => '<iframe src="//www.youtube.com/embed/mZqGqE0D0n4?autoplay=1" frameborder="0" allowfullscreen="allowfullscreen"></iframe>'
166
166
  ```
167
167
 
@@ -50,7 +50,8 @@ class VideoInfo
50
50
  def_delegators :@provider,
51
51
  :thumbnail_small,
52
52
  :thumbnail_medium,
53
- :thumbnail_large
53
+ :thumbnail_large,
54
+ :thumbnail_maxres
54
55
  def_delegators :@provider, :embed_code, :embed_url
55
56
  def_delegators :@provider, :available?
56
57
  def_delegators :@provider, :playlist_id, :videos
@@ -36,6 +36,12 @@ class VideoInfo
36
36
  !%w[403 404 400].include?(_response_code)
37
37
  end
38
38
 
39
+ def thumbnail
40
+ if defined?(thumbnail_large)
41
+ thumbnail_large
42
+ end
43
+ end
44
+
39
45
  private
40
46
 
41
47
  def _response_code
@@ -17,6 +17,18 @@ class VideoInfo
17
17
  define_method(method) { nil }
18
18
  end
19
19
 
20
+ def author
21
+ data['owner.screenname']
22
+ end
23
+
24
+ def author_url
25
+ data['owner.url']
26
+ end
27
+
28
+ def author_thumbnail
29
+ data['owner.avatar_60_url']
30
+ end
31
+
20
32
  def keywords
21
33
  data['tags']
22
34
  end
@@ -71,6 +83,7 @@ class VideoInfo
71
83
  "https://#{_api_base}#{_api_path}?" \
72
84
  'fields=id,title,description,duration,created_time,' \
73
85
  'url,views_total,tags,thumbnail_url,thumbnail_720_url,' \
86
+ 'owner.url,owner.screenname,owner.avatar_60_url,' \
74
87
  'thumbnail_240_url,thumbnail_60_url'
75
88
  end
76
89
 
@@ -39,25 +39,16 @@ class VideoInfo
39
39
  @thumbnail_id ||= _parse_picture_id(_video['pictures']['uri'])
40
40
  end
41
41
 
42
- def thumbnail(width = 200, height = nil)
43
- base_uri = "https://i.vimeocdn.com/video/#{thumbnail_id}"
44
- if height
45
- base_uri + "_#{width}x#{height}.jpg"
46
- else
47
- base_uri + "_#{width}.jpg"
48
- end
49
- end
50
-
51
42
  def thumbnail_small
52
- thumbnail(100, 75)
43
+ generate_thumbnail(100, 75)
53
44
  end
54
45
 
55
46
  def thumbnail_medium
56
- thumbnail(200, 150)
47
+ generate_thumbnail(200, 150)
57
48
  end
58
49
 
59
50
  def thumbnail_large
60
- thumbnail(640)
51
+ generate_thumbnail(640)
61
52
  end
62
53
 
63
54
  def keywords
@@ -78,6 +69,15 @@ class VideoInfo
78
69
 
79
70
  private
80
71
 
72
+ def generate_thumbnail(width = 200, height = nil)
73
+ base_uri = "https://i.vimeocdn.com/video/#{thumbnail_id}"
74
+ if height
75
+ base_uri + "_#{width}x#{height}.jpg"
76
+ else
77
+ base_uri + "_#{width}.jpg"
78
+ end
79
+ end
80
+
81
81
  def _clean_options(options)
82
82
  headers = [super, _authorization_headers, _api_version_headers]
83
83
  headers.inject(&:merge)
@@ -1,15 +1,23 @@
1
1
  require 'oga'
2
2
  require 'open-uri'
3
3
  require 'json'
4
+ require 'openssl'
5
+ require 'cgi'
4
6
 
5
7
  class VideoInfo
6
8
  module Providers
7
9
  module VimeoScraper
8
10
  def author
9
- json_info['author']['name']
11
+ if available?
12
+ json_info['author']['name']
13
+ end
10
14
  end
11
15
 
12
16
  def author_thumbnail
17
+ unless available?
18
+ return nil
19
+ end
20
+
13
21
  split_point = 'window.vimeo.clip_page_config ='
14
22
  script_tags = data.css('script')
15
23
 
@@ -27,7 +35,9 @@ class VideoInfo
27
35
  end
28
36
 
29
37
  def author_url
30
- json_info['author']['url']
38
+ if available?
39
+ json_info['author']['url']
40
+ end
31
41
  end
32
42
 
33
43
  def available?
@@ -36,9 +46,9 @@ class VideoInfo
36
46
  if data.nil?
37
47
  is_available = false
38
48
  elsif is_available
39
- page_header = data.css('#page_header')
49
+ password_elements = data.css('.exception_title--password')
40
50
 
41
- if page_header.text == "\n Private Video\n "
51
+ unless password_elements.empty?
42
52
  is_available = false
43
53
  end
44
54
  end
@@ -55,16 +65,24 @@ class VideoInfo
55
65
  end
56
66
 
57
67
  def date
58
- upload_date = json_info['uploadDate']
59
- ISO8601::DateTime.new(upload_date).to_time
68
+ if available?
69
+ upload_date = json_info['uploadDate']
70
+ ISO8601::DateTime.new(upload_date).to_time
71
+ end
60
72
  end
61
73
 
62
74
  def duration
63
- duration = json_info['duration']
64
- ISO8601::Duration.new(duration).to_seconds.to_i
75
+ if available?
76
+ duration = json_info['duration']
77
+ ISO8601::Duration.new(duration).to_seconds.to_i
78
+ end
65
79
  end
66
80
 
67
81
  def keywords
82
+ unless available?
83
+ return nil
84
+ end
85
+
68
86
  if json_info['keywords']
69
87
  json_info['keywords']
70
88
  else
@@ -73,27 +91,39 @@ class VideoInfo
73
91
  end
74
92
 
75
93
  def height
76
- json_info['height']
94
+ if available?
95
+ json_info['height']
96
+ end
77
97
  end
78
98
 
79
99
  def width
80
- json_info['width']
100
+ if available?
101
+ json_info['width']
102
+ end
81
103
  end
82
104
 
83
105
  def thumbnail_small
84
- thumbnail_url.split('_')[0] + '_100x75.jpg'
106
+ if available?
107
+ thumbnail_url.split('_')[0] + '_100x75.jpg'
108
+ end
85
109
  end
86
110
 
87
111
  def thumbnail_medium
88
- thumbnail_url.split('_')[0] + '_200x150.jpg'
112
+ if available?
113
+ thumbnail_url.split('_')[0] + '_200x150.jpg'
114
+ end
89
115
  end
90
116
 
91
117
  def thumbnail_large
92
- thumbnail_url.split('_')[0] + '_640.jpg'
118
+ if available?
119
+ thumbnail_url.split('_')[0] + '_640.jpg'
120
+ end
93
121
  end
94
122
 
95
123
  def view_count
96
- json_info['interactionCount']
124
+ if available?
125
+ json_info['interactionCount']
126
+ end
97
127
  end
98
128
 
99
129
  private
@@ -111,7 +141,17 @@ class VideoInfo
111
141
  end
112
142
 
113
143
  def thumbnail_url
114
- @thumbnail_url ||= json_info['thumbnailUrl']
144
+ @thumbnail_url ||= remove_overlay(meta_node_value('og:image'))
145
+ end
146
+
147
+ def remove_overlay(url)
148
+ uri = URI.parse(url)
149
+
150
+ if uri.path == '/filter/overlay'
151
+ CGI::parse(uri.query)['src0'][0]
152
+ else
153
+ url
154
+ end
115
155
  end
116
156
 
117
157
  def meta_nodes
@@ -1,7 +1,6 @@
1
- # encoding: UTF-8
1
+ # encoding: utf-8
2
2
  require 'cgi'
3
3
  require 'net/http'
4
- require 'oga'
5
4
 
6
5
  class VideoInfo
7
6
  module Providers
@@ -35,15 +34,11 @@ class VideoInfo
35
34
  end
36
35
 
37
36
  def width
38
- { 240 => 320,
39
- 360 => 480,
40
- 480 => 640,
41
- 720 => 1280
42
- }[height].to_i
37
+ data[/PLAYER_FULL_WIDTH":(\d+)/, 1].to_i
43
38
  end
44
39
 
45
40
  def height
46
- data[/url(\d+)/, 1].to_i
41
+ data[/PLAYER_FULL_HEIGHT":(\d+)/, 1].to_i
47
42
  end
48
43
 
49
44
  def author
@@ -52,15 +47,13 @@ class VideoInfo
52
47
  end
53
48
 
54
49
  def author_thumbnail
55
- split_point = '<img id="mv_author_img" class="mv_author_img" src="'
56
- author_img_split = data.split(split_point)[1]
57
- author_img_split.split('">')[0]
50
+ split_point = '<img id="mv_author_photo" class="mv_author_photo" src="'
51
+ get_between(split_point, '">')
58
52
  end
59
53
 
60
54
  def author_url
61
- split_point = '"author_href":"\\/'
62
- author_url_path = data.split(split_point)[1].split('"')[0]
63
- 'https://vk.com/' + author_url_path
55
+ split_point = "<div class=\"mv_author_name\">\n <a class=\"mem_link\" href=\""
56
+ 'https://vk.com' + get_between(split_point, '">')
64
57
  end
65
58
 
66
59
  def title
@@ -68,7 +61,7 @@ class VideoInfo
68
61
  end
69
62
 
70
63
  def view_count
71
- data[/mv_views_count_number\">.*?(\d+)/, 1].to_i
64
+ data[/mv_views_count.*?(\d+)/, 1].to_i
72
65
  end
73
66
 
74
67
  def embed_url
@@ -95,13 +88,32 @@ class VideoInfo
95
88
 
96
89
  def available?
97
90
  !%w[403 404 302 401].include?(_response_code) &&
98
- !(data =~ /Ошибка доступа/)
91
+ !(data =~ /(Ошибка доступа|Access denied)/)
92
+ end
93
+
94
+ def thumbnail_small
95
+ thumb = data[/"thumb":"(.*?)"/, 1]
96
+ return thumb.delete('\\') unless thumb.nil?
97
+ nil
98
+ end
99
+
100
+ def thumbnail_medium
101
+ thumbnail_small
102
+ end
103
+
104
+ def thumbnail_large
105
+ nil
106
+ end
107
+
108
+ def thumbnail_maxres
109
+ nil
99
110
  end
100
111
 
101
112
  private
102
113
 
103
114
  def _make_request(url, options)
104
115
  request = Net::HTTP::Post.new(url.path)
116
+ request.add_field 'User-Agent', 'Mozilla/5.0 (Linux; VideoInfo)'
105
117
  request.body = URI.encode_www_form(options)
106
118
  conn = Net::HTTP.new(url.host, url.port)
107
119
  conn.use_ssl = true
@@ -112,6 +124,8 @@ class VideoInfo
112
124
  def _set_data_from_api_impl(api_url)
113
125
  options['act'] = 'show'
114
126
  options['al'] = '1'
127
+ options['autoplay'] = '0'
128
+ options['module'] = 'profile'
115
129
  options['video'] = "#{@video_owner}_#{@video_id}"
116
130
  data = _make_request(api_url, options)
117
131
  if data.index('Ошибка доступа')
@@ -146,15 +160,15 @@ class VideoInfo
146
160
  end
147
161
 
148
162
  def _response_code
149
- response = Net::HTTP.get_response(_api_base, _api_path, 80)
150
- code = _get_response_code response
151
- if code == '302'
152
- _get_response_code Net::HTTP.get_response(
153
- URI.parse(response.header['location'])
154
- )
155
- else
156
- code
163
+ check_url = URI.parse(url)
164
+ req = Net::HTTP::Get.new(check_url)
165
+ req.add_field('User-Agent', 'Mozilla/5.0 (Linux; VideoInfo)')
166
+ res = Net::HTTP.start(check_url.host, check_url.port) do |http|
167
+ http.request(req)
157
168
  end
169
+ return res.code unless res.code == '302' && !res['location'].nil?
170
+ self.url = res['location']
171
+ _response_code
158
172
  end
159
173
 
160
174
  def _api_base
@@ -189,6 +203,10 @@ class VideoInfo
189
203
  def _api_url
190
204
  URI('https://vk.com/al_video.php')
191
205
  end
206
+
207
+ def get_between(from_here, to_here)
208
+ data.split(from_here)[1].split(to_here)[0]
209
+ end
192
210
  end
193
211
  end
194
212
  end
@@ -44,6 +44,10 @@ class VideoInfo
44
44
  "https://i.ytimg.com/vi/#{video_id}/hqdefault.jpg"
45
45
  end
46
46
 
47
+ def thumbnail_maxres
48
+ "https://i.ytimg.com/vi/#{video_id}/maxresdefault.jpg"
49
+ end
50
+
47
51
  private
48
52
 
49
53
  def _url_regex
@@ -1,3 +1,3 @@
1
1
  class VideoInfo
2
- VERSION = '2.6.1'.freeze
2
+ VERSION = '2.7'.freeze
3
3
  end
@@ -0,0 +1,84 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.dailymotion.com/video/inValIdiD
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 404
19
+ message: Not Found
20
+ headers:
21
+ Server:
22
+ - DMS/1.0.42
23
+ X-Dm-Backnode:
24
+ - web-115.adm.dailymotion.com:80
25
+ Cache-Control:
26
+ - no-cache, must-revalidate, stale-if-error=900
27
+ Content-Type:
28
+ - application/json; charset=UTF-8
29
+ Access-Control-Expose-Headers:
30
+ - X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status
31
+ X-Dm-Lb-Ip:
32
+ - 195.8.215.129
33
+ Expires:
34
+ - Fri, 01 Jan 2010 05:00:00 GMT
35
+ X-Dm-Lb-Name:
36
+ - lb-08
37
+ X-Dm-Random-Number:
38
+ - '5037760'
39
+ Access-Control-Allow-Origin:
40
+ - "*"
41
+ X-Dm-Backnode-Response-Time:
42
+ - '37'
43
+ X-Robots-Tag:
44
+ - noindex
45
+ Access-Control-Allow-Headers:
46
+ - Content-Type, Authorization
47
+ Access-Control-Allow-Methods:
48
+ - GET, POST, DELETE
49
+ X-Dm-Page:
50
+ - us.rest.rest_api
51
+ Via:
52
+ - 1.1 varnish
53
+ - 1.1 varnish
54
+ Fastly-Debug-Digest:
55
+ - 1f140405cf79803f1e28a389edd8ca212ce1e285b54a58fb8a17474780cac6a2
56
+ Content-Length:
57
+ - '172'
58
+ Accept-Ranges:
59
+ - bytes
60
+ Date:
61
+ - Mon, 28 Dec 2015 17:43:14 GMT
62
+ Age:
63
+ - '0'
64
+ Connection:
65
+ - keep-alive
66
+ X-Served-By:
67
+ - cache-fra1225-FRA, cache-sjc3122-SJC
68
+ X-Cache:
69
+ - MISS, MISS
70
+ X-Cache-Hits:
71
+ - 0, 0
72
+ Vary:
73
+ - X-DM-EC-Geo-Country, Accept-Encoding
74
+ X-Dm-Cache-Status:
75
+ - MISS
76
+ X-Dm-Edge:
77
+ - Fastly
78
+ body:
79
+ encoding: ASCII-8BIT
80
+ string: '{"error":{"more_info":"https:\/\/developer.dailymotion.com\/api#error-codes","code":404,"message":"Can''t
81
+ find object video for `id'' parameter","type":"not_found","error_data":{"reason":"object_not_found"}}}'
82
+ http_version:
83
+ recorded_at: Mon, 28 Dec 2015 17:43:18 GMT
84
+ recorded_with: VCR 3.0.1