video_info 2.6.1 → 2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -2
- data/README.md +2 -2
- data/lib/video_info.rb +2 -1
- data/lib/video_info/provider.rb +6 -0
- data/lib/video_info/providers/dailymotion.rb +13 -0
- data/lib/video_info/providers/vimeo_api.rb +12 -12
- data/lib/video_info/providers/vimeo_scraper.rb +55 -15
- data/lib/video_info/providers/vkontakte.rb +42 -24
- data/lib/video_info/providers/youtube.rb +4 -0
- data/lib/video_info/version.rb +1 -1
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +13 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +13 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +1716 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +1195 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +1532 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/1_3_12_1.yml +92 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +1143 -10
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +1195 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_7_1.yml +11 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_8_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_9_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_10_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_11_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +1195 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_9_1.yml +12 -12
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_10_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +1195 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_8_1.yml +12 -12
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_9_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_16_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_17_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_18_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_19_1.yml +951 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_15_1.yml +12 -12
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_16_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_17_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +951 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_14_1.yml +12 -12
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_15_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_16_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +951 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_13_1.yml +12 -12
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_14_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_15_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +951 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +1632 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_16_1.yml +13 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_17_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_18_1.yml +280 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_19_1.yml +189 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_20_1.yml +951 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +837 -683
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +17 -11
- 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
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +1584 -2512
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +15 -67
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_12_2_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +1406 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_12_3_1.yml +1674 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_12_4_1.yml +1674 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +1407 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_12_1_1.yml +1404 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_12_7_1.yml +1404 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +1408 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_12_6_1.yml +1406 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_12_8_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +1406 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_12_10_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_12_9_1.yml +1675 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +1408 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_12_14_1.yml +1404 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_12_13_1.yml +1406 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +1407 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_12_12_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +1410 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_12_5_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +1408 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_12_15_1.yml +1674 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_12_11_1.yml +1405 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +1409 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_18_1.yml +1931 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_18_1.yml +79 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_17_1.yml +1931 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_17_1.yml +79 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_19_1.yml +1931 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_19_1.yml +79 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +1863 -1451
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +1780 -1451
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +1842 -1441
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +1769 -1367
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +1863 -1451
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_16_1.yml +2003 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_16_1.yml +79 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +1914 -1441
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +1914 -1441
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +1914 -1441
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +1780 -1451
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_20_1.yml +1931 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_20_1.yml +79 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +1842 -1441
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +22 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/1_12_1_1.yml +1994 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/2_12_1_1.yml +222 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/1_12_2_1.yml +1994 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/2_12_2_1.yml +222 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/1_12_3_1.yml +1994 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/2_12_3_1.yml +222 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/1_12_4_1.yml +1994 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/2_12_4_1.yml +222 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/1_3_17_1.yml +1408 -2382
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/1_3_16_1.yml +1736 -2380
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/1_3_12_1.yml +1585 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/1_3_7_1.yml +1580 -2435
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/1_3_9_1.yml +1731 -2645
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/1_3_11_1.yml +1591 -2582
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/1_3_8_1.yml +1915 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/1_3_15_1.yml +1736 -2381
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/1_3_14_1.yml +1408 -2381
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/1_3_13_1.yml +1736 -2379
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/1_3_6_1.yml +1515 -2639
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_18_1.yml +73 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/1_3_10_1.yml +1988 -2381
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +61 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +61 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_date/1_3_12_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_description/1_3_7_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_duration/1_3_9_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_height/1_3_11_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_keywords/1_3_8_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_large/1_3_15_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_medium/1_3_14_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_thumbnail_small/1_3_13_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_title/1_3_6_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_videos/1_3_16_1.yml +148 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_view_count/1_3_17_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_VimeoPlaylist/with_playlist_1921098/_width/1_3_10_1.yml +63 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +4160 -2907
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +14 -10
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +509 -716
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +1057 -553
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +3183 -2025
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +452 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +452 -0
- 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
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +450 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/keywords/1_5_9_1.yml +451 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +452 -0
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +451 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +1027 -644
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +964 -462
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/1_6_8_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/1_6_10_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/1_6_6_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/1_6_5_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/1_6_12_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/keywords/1_6_9_1.yml +438 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/1_6_7_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/1_6_13_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/1_6_11_1.yml +10 -413
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/description/1_6_8_1.yml +991 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/duration/1_6_10_1.yml +995 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_code/1_6_6_1.yml +993 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_url/1_6_5_1.yml +990 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/height/1_6_12_1.yml +994 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/title/1_6_7_1.yml +996 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/view_count/1_6_13_1.yml +995 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/width/1_6_11_1.yml +992 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +1009 -490
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +1011 -490
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +1012 -490
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +1011 -490
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +13 -17
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +13 -17
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_13_1.yml +77 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +20 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +217 -252
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +225 -262
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +233 -273
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +225 -264
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +241 -279
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +250 -289
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +7 -9
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_16_1.yml +466 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_17_1.yml +483 -0
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_17_1.yml +54 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +3837 -3839
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_available_/1_2_2_1_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_available_/1_2_3_1_1.yml +508 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_date/1_2_2_11_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_date/1_2_3_11_1.yml +510 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_description/1_2_2_8_1.yml +56 -0
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_duration/1_2_2_10_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_duration/1_2_3_10_1.yml +508 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_keywords/1_2_2_9_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_keywords/1_2_3_9_1.yml +509 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_title/1_2_2_7_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_title/1_2_3_7_1.yml +509 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_view_count/1_2_2_15_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_is_unavailable_video/_view_count/1_2_3_15_1.yml +509 -0
- 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
- 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
- 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
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/1_17_12_1.yml +119 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/1_18_12_1.yml +3681 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +3838 -3661
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +3805 -3875
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_18_7_1.yml +3686 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +3815 -3859
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_18_9_1.yml +3687 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +3690 -3756
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_18_8_1.yml +3680 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +3745 -3757
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_18_6_1.yml +3700 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +3846 -3795
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_18_16_1.yml +3630 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs_with_params/_title/1_19_1_1.yml +1243 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +3863 -3922
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +3837 -3926
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +20 -24
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +3815 -3988
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +20 -24
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/1_3_12_1.yml +3826 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +3764 -3691
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +3813 -3881
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_7_1.yml +3832 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +3823 -3843
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_9_1.yml +3838 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +3610 -3640
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_8_1.yml +3854 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_6_1.yml +3832 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +3821 -3856
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_16_1.yml +3682 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_19_1.yml +3715 -3800
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_20_1.yml +3909 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_19_1.yml +10 -10
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_20_1.yml +125 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +8 -10
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +8 -10
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +9 -11
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL0E8117603D70E10A_in_embed_path/_videos/1_4_2_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/{1_3_18_1.yml → 1_3_19_1.yml} +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/{2_3_18_1.yml → 2_3_19_1.yml} +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_url → _author_thumbnail}/1_3_20_1.yml +25 -29
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/{_author_url → _author_thumbnail}/2_3_20_1.yml +25 -29
- 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
- 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
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_16_1.yml +105 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/2_3_16_1.yml +105 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +14 -16
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +15 -17
- 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
- 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
- data/spec/lib/video_info/providers/dailymotion_spec.rb +20 -0
- data/spec/lib/video_info/providers/vimeo_spec.rb +52 -1
- data/spec/lib/video_info/providers/vkontakte_spec.rb +31 -35
- data/spec/lib/video_info/providers/wistia_spec.rb +9 -1
- data/spec/lib/video_info/providers/youtube_playlist_spec.rb +10 -4
- data/spec/lib/video_info/providers/youtube_spec.rb +19 -1
- data/video_info.gemspec +3 -3
- metadata +330 -72
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_17_1.yml +0 -1530
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_17_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_16_1.yml +0 -1530
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_16_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_18_1.yml +0 -1529
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_18_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_19_1.yml +0 -1530
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_19_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/2_3_17_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/2_3_16_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/1_3_18_1.yml +0 -2559
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/2_3_18_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/should_have_correct_upload_date.yml +0 -2714
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/2_3_7_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/2_3_9_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/2_3_11_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/should_return_a_string_list_of_keywords.yml +0 -2716
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/2_3_15_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/2_3_14_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/2_3_13_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/2_3_6_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_19_1.yml +0 -2560
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/2_3_19_1.yml +0 -159
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51bc4b80a2d491ea898adc7c0e57a77548ff93d
|
4
|
+
data.tar.gz: 5a1469a4e6817e37793097a3b68b7155bcb63eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae91bf616bda0bab0a23f0f2195f4cdc4cf712bb1738331b81344bb523f54ca19805cf9383a0395438458899472dba37b10cbddb6e5cd80e177132c225f91ee
|
7
|
+
data.tar.gz: 38c99abe24884a9b7be1e3ab49f31567fb012f3fb2c3750a7f12614850caee5fc59327f134320ab68f4678f35a78bba2ff4ed0e1ebf463ad1483889b1bbb30d0
|
data/.travis.yml
CHANGED
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
|
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
|
-
|
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
|
|
data/lib/video_info.rb
CHANGED
@@ -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
|
data/lib/video_info/provider.rb
CHANGED
@@ -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
|
-
|
43
|
+
generate_thumbnail(100, 75)
|
53
44
|
end
|
54
45
|
|
55
46
|
def thumbnail_medium
|
56
|
-
|
47
|
+
generate_thumbnail(200, 150)
|
57
48
|
end
|
58
49
|
|
59
50
|
def thumbnail_large
|
60
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
49
|
+
password_elements = data.css('.exception_title--password')
|
40
50
|
|
41
|
-
|
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
|
-
|
59
|
-
|
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
|
-
|
64
|
-
|
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
|
-
|
94
|
+
if available?
|
95
|
+
json_info['height']
|
96
|
+
end
|
77
97
|
end
|
78
98
|
|
79
99
|
def width
|
80
|
-
|
100
|
+
if available?
|
101
|
+
json_info['width']
|
102
|
+
end
|
81
103
|
end
|
82
104
|
|
83
105
|
def thumbnail_small
|
84
|
-
|
106
|
+
if available?
|
107
|
+
thumbnail_url.split('_')[0] + '_100x75.jpg'
|
108
|
+
end
|
85
109
|
end
|
86
110
|
|
87
111
|
def thumbnail_medium
|
88
|
-
|
112
|
+
if available?
|
113
|
+
thumbnail_url.split('_')[0] + '_200x150.jpg'
|
114
|
+
end
|
89
115
|
end
|
90
116
|
|
91
117
|
def thumbnail_large
|
92
|
-
|
118
|
+
if available?
|
119
|
+
thumbnail_url.split('_')[0] + '_640.jpg'
|
120
|
+
end
|
93
121
|
end
|
94
122
|
|
95
123
|
def view_count
|
96
|
-
|
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 ||=
|
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:
|
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
|
-
|
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[/
|
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="
|
56
|
-
|
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 =
|
62
|
-
|
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[/
|
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
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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
|
data/lib/video_info/version.rb
CHANGED
@@ -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
|