video_info 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.rubocop.yml +242 -1
- data/.travis.yml +9 -8
- data/CONTRIBUTING.md +11 -0
- data/Gemfile +1 -1
- data/Guardfile +1 -1
- data/README.md +34 -1
- data/lib/video_info.rb +22 -26
- data/lib/video_info/provider.rb +8 -10
- data/lib/video_info/providers/dailymotion.rb +6 -3
- data/lib/video_info/providers/vimeo.rb +3 -3
- data/lib/video_info/providers/vimeo_api.rb +13 -4
- data/lib/video_info/providers/vimeo_scraper.rb +33 -13
- data/lib/video_info/providers/vkontakte.rb +38 -14
- data/lib/video_info/providers/wistia.rb +2 -1
- data/lib/video_info/providers/youtube.rb +4 -2
- data/lib/video_info/providers/youtube_api.rb +38 -3
- data/lib/video_info/providers/youtube_scraper.rb +26 -12
- data/lib/video_info/providers/youtubeplaylist.rb +5 -2
- data/lib/video_info/providers/youtubeplaylist_api.rb +8 -1
- data/lib/video_info/providers/youtubeplaylist_scraper.rb +16 -3
- data/lib/video_info/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +89 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +92 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_7_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_9_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_8_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_15_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_14_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_13_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_16_1.yml +95 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +964 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +59 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +936 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +61 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +2692 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +119 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_17_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_17_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_16_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_16_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_18_1.yml +1529 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_18_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +1595 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +1602 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +1529 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +1595 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +1602 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_19_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_19_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +1530 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +68 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/1_3_17_1.yml +2559 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author/2_3_17_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/1_3_16_1.yml +2559 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_thumbnail/2_3_16_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/1_3_18_1.yml +2559 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_author_url/2_3_18_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_date/should_have_correct_upload_date.yml +2714 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/1_3_7_1.yml +2692 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_description/2_3_7_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/1_3_9_1.yml +2829 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_duration/2_3_9_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/1_3_11_1.yml +2828 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_height/2_3_11_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_keywords/should_return_a_string_list_of_keywords.yml +2716 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/1_3_15_1.yml +2560 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_large/2_3_15_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/1_3_14_1.yml +2558 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_medium/2_3_14_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/1_3_13_1.yml +2558 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_thumbnail_small/2_3_13_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/1_3_6_1.yml +2961 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_title/2_3_6_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/1_3_19_1.yml +2560 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_view_count/2_3_19_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/1_3_10_1.yml +2560 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_898029/_width/2_3_10_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +2996 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +46 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +865 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +666 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect_to_main_page_for_auth/available_/1_2_5_1_1.yml +46 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +2118 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author/1_5_14_1.yml +518 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_thumbnail/1_5_15_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_url/1_5_16_1.yml +520 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +518 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +517 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_code/1_5_6_1.yml +517 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_url/1_5_5_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +517 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +517 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/view_count/1_5_13_1.yml +521 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +517 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/author/1_3_7_1.yml +399 -0
- 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 +399 -0
- 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 +399 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/title/1_3_4_1.yml +399 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +682 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +501 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/1_6_8_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/1_6_10_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/1_6_6_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/1_6_5_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/1_6_12_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/1_6_7_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/1_6_13_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/1_6_11_1.yml +449 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +527 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +527 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +527 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +527 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +71 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +73 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +516 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +521 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +519 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_15_1.yml +516 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_15_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +3930 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +578 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +117 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +3912 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +4007 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +3982 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +3984 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +3946 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +3948 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +4006 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +4027 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +212 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +4080 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +212 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +3982 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +3992 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +3961 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +3928 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +3974 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_19_1.yml +3950 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_19_1.yml +127 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +62 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +62 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +96 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +96 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +96 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +96 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_18_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/2_3_18_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_19_1.yml +193 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/2_3_19_1.yml +193 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_20_1.yml +193 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/2_3_20_1.yml +193 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +107 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +267 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +56 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +56 -0
- data/spec/lib/video_info/provider_spec.rb +42 -22
- data/spec/lib/video_info/providers/dailymotion_spec.rb +41 -23
- data/spec/lib/video_info/providers/vimeo_spec.rb +212 -177
- data/spec/lib/video_info/providers/vkontakte_spec.rb +132 -63
- data/spec/lib/video_info/providers/wistia_spec.rb +34 -13
- data/spec/lib/video_info/providers/youtube_playlist_spec.rb +185 -139
- data/spec/lib/video_info/providers/youtube_spec.rb +400 -385
- data/spec/lib/video_info_spec.rb +27 -21
- data/video_info.gemspec +7 -10
- metadata +424 -87
- data/foo.txt +0 -33
- data/spec/lib/video_info/providers/vimeo_api_spec.rb +0 -242
- data/spec/lib/video_info/providers/youtube_api_spec.rb +0 -476
- data/spec/lib/video_info/providers/youtube_playlist_api_spec.rb +0 -187
@@ -8,7 +8,20 @@ class VideoInfo
|
|
8
8
|
def date
|
9
9
|
date = itemprop_node_value('datePublished')
|
10
10
|
|
11
|
-
Time.parse(date)
|
11
|
+
Time.parse(date) if date
|
12
|
+
end
|
13
|
+
|
14
|
+
def author
|
15
|
+
data.css('.yt-user-info')[0].css('a').text
|
16
|
+
end
|
17
|
+
|
18
|
+
def author_thumbnail
|
19
|
+
data.css('.yt-thumb-clip')[0].css('img').attr('data-thumb')[0].value
|
20
|
+
end
|
21
|
+
|
22
|
+
def author_url
|
23
|
+
path = data.css('.yt-user-info')[0].css('a')[0].attr('href').value
|
24
|
+
'https://www.youtube.com' + path
|
12
25
|
end
|
13
26
|
|
14
27
|
def description
|
@@ -28,7 +41,7 @@ class VideoInfo
|
|
28
41
|
def keywords
|
29
42
|
value = meta_node_value('keywords')
|
30
43
|
|
31
|
-
value.split(', ')
|
44
|
+
value.split(', ') if value
|
32
45
|
end
|
33
46
|
|
34
47
|
def title
|
@@ -58,7 +71,7 @@ class VideoInfo
|
|
58
71
|
node = meta_nodes.detect do |m|
|
59
72
|
itemprop_attr = m.attr('itemprop')
|
60
73
|
|
61
|
-
itemprop_attr.value == name
|
74
|
+
itemprop_attr.value == name if itemprop_attr
|
62
75
|
end
|
63
76
|
|
64
77
|
node.attr('content').value
|
@@ -70,25 +83,26 @@ class VideoInfo
|
|
70
83
|
end
|
71
84
|
|
72
85
|
def _set_data_from_api_impl(api_url)
|
73
|
-
uri = URI(api_url)
|
74
|
-
|
75
|
-
unless uri.scheme
|
76
|
-
uri.path = uri.path.prepend('//')
|
77
|
-
uri.scheme = 'http'
|
78
|
-
end
|
79
|
-
|
80
86
|
# handle fullscreen video URLs
|
81
87
|
if url.include?('.com/v/')
|
82
88
|
video_id = url.split('/v/')[1].split('?')[0]
|
83
89
|
new_url = 'https://www.youtube.com/watch?v=' + video_id
|
84
90
|
Oga.parse_html(open(new_url).read)
|
85
91
|
else
|
86
|
-
Oga.parse_html(open(
|
92
|
+
Oga.parse_html(open(api_url).read)
|
87
93
|
end
|
88
94
|
end
|
89
95
|
|
90
96
|
def _api_url
|
91
|
-
@url
|
97
|
+
uri = URI.parse(@url)
|
98
|
+
|
99
|
+
unless uri.scheme
|
100
|
+
uri.path = uri.path.prepend('//')
|
101
|
+
end
|
102
|
+
|
103
|
+
uri.scheme = 'https'
|
104
|
+
|
105
|
+
uri.to_s
|
92
106
|
end
|
93
107
|
end
|
94
108
|
end
|
@@ -18,7 +18,8 @@ class VideoInfo
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.usable?(url)
|
21
|
-
url =~
|
21
|
+
url =~ %r{((youtube\.com)\/playlist)|
|
22
|
+
((youtube\.com)\/embed\/videoseries)}x
|
22
23
|
end
|
23
24
|
|
24
25
|
def date
|
@@ -48,7 +49,9 @@ class VideoInfo
|
|
48
49
|
private
|
49
50
|
|
50
51
|
def _url_regex
|
51
|
-
|
52
|
+
%r{youtube.com\/playlist\?p=(\S*)|
|
53
|
+
youtube.com\/playlist\?list=(\S*)|
|
54
|
+
youtube.com\/embed\/videoseries\?list=([a-zA-Z0-9-]*)}x
|
52
55
|
end
|
53
56
|
end
|
54
57
|
end
|
@@ -1,5 +1,11 @@
|
|
1
1
|
class VideoInfo
|
2
2
|
module YoutubePlaylistAPI
|
3
|
+
def available?
|
4
|
+
!data['items'].empty?
|
5
|
+
rescue VideoInfo::HttpError
|
6
|
+
false
|
7
|
+
end
|
8
|
+
|
3
9
|
def description
|
4
10
|
data['items'][0]['snippet']['description']
|
5
11
|
end
|
@@ -49,7 +55,8 @@ class VideoInfo
|
|
49
55
|
end
|
50
56
|
|
51
57
|
def _playlist_items_api_path
|
52
|
-
|
58
|
+
'/youtube/v3/playlistItems?part=snippet&' \
|
59
|
+
"playlistId=#{playlist_id}&fields=items&key=#{api_key}"
|
53
60
|
end
|
54
61
|
|
55
62
|
def _playlist_items_api_url
|
@@ -1,6 +1,4 @@
|
|
1
1
|
require 'oga'
|
2
|
-
require 'open-uri'
|
3
|
-
require 'open_uri_redirections'
|
4
2
|
|
5
3
|
class VideoInfo
|
6
4
|
module Providers
|
@@ -17,8 +15,23 @@ class VideoInfo
|
|
17
15
|
nil
|
18
16
|
end
|
19
17
|
|
18
|
+
def author
|
19
|
+
data.css('.channel-header-profile-image').attr('title')[0].value
|
20
|
+
end
|
21
|
+
|
22
|
+
def author_thumbnail
|
23
|
+
data.css('.channel-header-profile-image').attr('src')[0].value
|
24
|
+
end
|
25
|
+
|
26
|
+
def author_url
|
27
|
+
element = data.css('.channel-header-profile-image-container')
|
28
|
+
'https://www.youtube.com' + element.attr('href')[0].value
|
29
|
+
end
|
30
|
+
|
20
31
|
def videos
|
21
|
-
raise(NotImplementedError,
|
32
|
+
raise(NotImplementedError,
|
33
|
+
'To access videos, you must provide an API key ' \
|
34
|
+
'to VideoInfo.provider_api_keys')
|
22
35
|
end
|
23
36
|
|
24
37
|
def view_count
|
data/lib/video_info/version.rb
CHANGED
@@ -0,0 +1,89 @@
|
|
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-Api-Object:
|
24
|
+
- video
|
25
|
+
X-Dm-Backnode:
|
26
|
+
- 10.194.151.108:80
|
27
|
+
X-Dm-Api-Method:
|
28
|
+
- info
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache, must-revalidate, stale-if-error=900
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=UTF-8
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Date, X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status, X-Served-By,
|
35
|
+
X-DM-BackNode-Response-Time
|
36
|
+
X-Dm-Lb-Ip:
|
37
|
+
- 195.8.215.129
|
38
|
+
Expires:
|
39
|
+
- Fri, 01 Jan 2010 05:00:00 GMT
|
40
|
+
X-Dm-Lb-Name:
|
41
|
+
- lb-09
|
42
|
+
X-Dm-Random-Number:
|
43
|
+
- '2083301'
|
44
|
+
Access-Control-Allow-Origin:
|
45
|
+
- "*"
|
46
|
+
X-Dm-Backnode-Response-Time:
|
47
|
+
- '22'
|
48
|
+
X-Robots-Tag:
|
49
|
+
- noindex
|
50
|
+
Access-Control-Allow-Headers:
|
51
|
+
- Content-Type, Authorization
|
52
|
+
Access-Control-Allow-Methods:
|
53
|
+
- GET, POST, DELETE
|
54
|
+
X-Dm-Page:
|
55
|
+
- us.rest.rest_api
|
56
|
+
Via:
|
57
|
+
- 1.1 varnish
|
58
|
+
- 1.1 varnish
|
59
|
+
Fastly-Debug-Digest:
|
60
|
+
- 1f140405cf79803f1e28a389edd8ca212ce1e285b54a58fb8a17474780cac6a2
|
61
|
+
Content-Length:
|
62
|
+
- '206'
|
63
|
+
Accept-Ranges:
|
64
|
+
- bytes
|
65
|
+
Date:
|
66
|
+
- Thu, 05 May 2016 01:01:43 GMT
|
67
|
+
Age:
|
68
|
+
- '0'
|
69
|
+
Connection:
|
70
|
+
- keep-alive
|
71
|
+
X-Served-By:
|
72
|
+
- cache-fra1232-FRA, cache-sjc3135-SJC
|
73
|
+
X-Cache:
|
74
|
+
- MISS, MISS
|
75
|
+
X-Cache-Hits:
|
76
|
+
- 0, 0
|
77
|
+
Vary:
|
78
|
+
- X-DM-EC-Geo-Country
|
79
|
+
X-Dm-Cache-Status:
|
80
|
+
- MISS
|
81
|
+
X-Dm-Edge:
|
82
|
+
- Fastly
|
83
|
+
body:
|
84
|
+
encoding: UTF-8
|
85
|
+
string: '{"error":{"more_info":"https:\/\/developer.dailymotion.com\/api#error-codes","code":404,"message":"Can''t
|
86
|
+
find object video for `id'' parameter","type":"not_found","error_data":{"reason":"object_not_found"}}}'
|
87
|
+
http_version:
|
88
|
+
recorded_at: Thu, 05 May 2016 01:01:43 GMT
|
89
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,92 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.dailymotion.com/video/x7lni3
|
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: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- DMS/1.0.42
|
23
|
+
X-Dm-Api-Object:
|
24
|
+
- video
|
25
|
+
X-Dm-Backnode:
|
26
|
+
- 10.190.2.132:80
|
27
|
+
X-Dm-Api-Method:
|
28
|
+
- info
|
29
|
+
Cache-Control:
|
30
|
+
- public, max-age=900, stale-if-error=900
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=UTF-8
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Date, X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status, X-Served-By,
|
35
|
+
X-DM-BackNode-Response-Time
|
36
|
+
X-Dm-Lb-Ip:
|
37
|
+
- 195.8.215.129
|
38
|
+
X-Dm-Tg:
|
39
|
+
- v-x7lni3
|
40
|
+
X-Dm-Lb-Name:
|
41
|
+
- lb-10
|
42
|
+
X-Dm-Random-Number:
|
43
|
+
- '5983493'
|
44
|
+
Access-Control-Allow-Origin:
|
45
|
+
- "*"
|
46
|
+
X-Dm-Backnode-Response-Time:
|
47
|
+
- '34'
|
48
|
+
Etag:
|
49
|
+
- W/"rQeFNlJ5iMPO8gmsSDhiVw-gzip"
|
50
|
+
X-Robots-Tag:
|
51
|
+
- noindex
|
52
|
+
Last-Modified:
|
53
|
+
- Tue, 19 May 2015 07:03:39 GMT
|
54
|
+
Access-Control-Allow-Headers:
|
55
|
+
- Content-Type, Authorization
|
56
|
+
Access-Control-Allow-Methods:
|
57
|
+
- GET, POST, DELETE
|
58
|
+
X-Dm-Page:
|
59
|
+
- us.rest.rest_api
|
60
|
+
Via:
|
61
|
+
- 1.1 varnish
|
62
|
+
- 1.1 varnish
|
63
|
+
Fastly-Debug-Digest:
|
64
|
+
- 5156934e90466ffd0e4642c50195b7206345d38887e9d445fa00692b2f902722
|
65
|
+
Content-Length:
|
66
|
+
- '103'
|
67
|
+
Accept-Ranges:
|
68
|
+
- bytes
|
69
|
+
Date:
|
70
|
+
- Thu, 05 May 2016 01:01:43 GMT
|
71
|
+
Age:
|
72
|
+
- '0'
|
73
|
+
Connection:
|
74
|
+
- keep-alive
|
75
|
+
X-Served-By:
|
76
|
+
- cache-fra1249-FRA, cache-sjc3125-SJC
|
77
|
+
X-Cache:
|
78
|
+
- MISS, MISS
|
79
|
+
X-Cache-Hits:
|
80
|
+
- 0, 0
|
81
|
+
Vary:
|
82
|
+
- X-DM-EC-Geo-Country, Accept-Encoding
|
83
|
+
X-Dm-Cache-Status:
|
84
|
+
- MISS
|
85
|
+
X-Dm-Edge:
|
86
|
+
- Fastly
|
87
|
+
body:
|
88
|
+
encoding: ASCII-8BIT
|
89
|
+
string: '{"id":"x7lni3","title":"Mario Kart (R\u00e9mi Gaillard)","channel":"fun","owner":"x4r137"}'
|
90
|
+
http_version:
|
91
|
+
recorded_at: Thu, 05 May 2016 01:01:43 GMT
|
92
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.dailymotion.com/video/x7lni3?fields=id,title,description,duration,created_time,url,views_total,tags,thumbnail_url,thumbnail_720_url,thumbnail_240_url,thumbnail_60_url
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- VideoInfo/2.6.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- DMS/1.0.42
|
23
|
+
X-Dm-Api-Object:
|
24
|
+
- video
|
25
|
+
X-Dm-Backnode:
|
26
|
+
- 10.190.2.38:80
|
27
|
+
X-Dm-Api-Method:
|
28
|
+
- info
|
29
|
+
Cache-Control:
|
30
|
+
- public, max-age=900, stale-if-error=900
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=UTF-8
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Date, X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status, X-Served-By,
|
35
|
+
X-DM-BackNode-Response-Time
|
36
|
+
X-Dm-Lb-Ip:
|
37
|
+
- 195.8.215.129
|
38
|
+
X-Dm-Tg:
|
39
|
+
- v-x7lni3
|
40
|
+
X-Dm-Lb-Name:
|
41
|
+
- lb-10
|
42
|
+
X-Dm-Random-Number:
|
43
|
+
- '7329818'
|
44
|
+
Access-Control-Allow-Origin:
|
45
|
+
- "*"
|
46
|
+
Etag:
|
47
|
+
- W/"rQeFNlJ5iMPO8gmsSDhiVw-gzip"
|
48
|
+
X-Robots-Tag:
|
49
|
+
- noindex
|
50
|
+
Last-Modified:
|
51
|
+
- Tue, 19 May 2015 07:03:39 GMT
|
52
|
+
Access-Control-Allow-Headers:
|
53
|
+
- Content-Type, Authorization
|
54
|
+
Access-Control-Allow-Methods:
|
55
|
+
- GET, POST, DELETE
|
56
|
+
X-Dm-Page:
|
57
|
+
- us.rest.rest_api
|
58
|
+
Via:
|
59
|
+
- 1.1 varnish
|
60
|
+
- 1.1 varnish
|
61
|
+
Fastly-Debug-Digest:
|
62
|
+
- 3553012804c358303689e11ec92c5f0012bb9c79e3360e85b4454ccedf666ef9
|
63
|
+
Content-Length:
|
64
|
+
- '441'
|
65
|
+
Accept-Ranges:
|
66
|
+
- bytes
|
67
|
+
Date:
|
68
|
+
- Thu, 05 May 2016 01:01:44 GMT
|
69
|
+
Age:
|
70
|
+
- '0'
|
71
|
+
Connection:
|
72
|
+
- keep-alive
|
73
|
+
X-Served-By:
|
74
|
+
- cache-fra1238-FRA, cache-sjc3131-SJC
|
75
|
+
X-Cache:
|
76
|
+
- MISS, HIT
|
77
|
+
X-Cache-Hits:
|
78
|
+
- 0, 1
|
79
|
+
Vary:
|
80
|
+
- X-DM-EC-Geo-Country, Accept-Encoding
|
81
|
+
X-Dm-Backnode-Response-Time:
|
82
|
+
- '0'
|
83
|
+
X-Dm-Cache-Status:
|
84
|
+
- HIT
|
85
|
+
X-Dm-Edge:
|
86
|
+
- Fastly
|
87
|
+
body:
|
88
|
+
encoding: ASCII-8BIT
|
89
|
+
string: '{"id":"x7lni3","title":"Mario Kart (R\u00e9mi Gaillard)","description":"Super
|
90
|
+
R\u00e9mi Kart est un jeu vid\u00e9o de course d\u00e9velopp\u00e9 et \u00e9dit\u00e9
|
91
|
+
par N''Importe Quoi TV. Sa principale originalit\u00e9 vient de sa r\u00e9alit\u00e9...<br
|
92
|
+
\/>L''aventure continue sur www.nimportequi.com","duration":136,"created_time":1228321771,"url":"http:\/\/www.dailymotion.com\/video\/x7lni3_mario-kart-remi-gaillard_fun","views_total":10300359,"tags":["r\u00e9mi","remi","gaillard","imposteur","imposture","mario","bros","kart","nintendo","jeux"],"thumbnail_url":"http:\/\/s2.dmcdn.net\/BgWxI.jpg","thumbnail_720_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x720-YcV.jpg","thumbnail_240_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x240-b83.jpg","thumbnail_60_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x60-kbf.jpg"}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 05 May 2016 01:01:44 GMT
|
95
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.dailymotion.com/video/x7lni3?fields=id,title,description,duration,created_time,url,views_total,tags,thumbnail_url,thumbnail_720_url,thumbnail_240_url,thumbnail_60_url
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- VideoInfo/2.6.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- DMS/1.0.42
|
23
|
+
X-Dm-Api-Object:
|
24
|
+
- video
|
25
|
+
X-Dm-Backnode:
|
26
|
+
- 10.190.2.38:80
|
27
|
+
X-Dm-Api-Method:
|
28
|
+
- info
|
29
|
+
Cache-Control:
|
30
|
+
- public, max-age=900, stale-if-error=900
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=UTF-8
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Date, X-DM-BackNode-Response-Time, X-DM-Edge, X-DM-Cache-Status, X-Served-By,
|
35
|
+
X-DM-BackNode-Response-Time
|
36
|
+
X-Dm-Lb-Ip:
|
37
|
+
- 195.8.215.129
|
38
|
+
X-Dm-Tg:
|
39
|
+
- v-x7lni3
|
40
|
+
X-Dm-Lb-Name:
|
41
|
+
- lb-10
|
42
|
+
X-Dm-Random-Number:
|
43
|
+
- '7329818'
|
44
|
+
Access-Control-Allow-Origin:
|
45
|
+
- "*"
|
46
|
+
Etag:
|
47
|
+
- W/"rQeFNlJ5iMPO8gmsSDhiVw-gzip"
|
48
|
+
X-Robots-Tag:
|
49
|
+
- noindex
|
50
|
+
Last-Modified:
|
51
|
+
- Tue, 19 May 2015 07:03:39 GMT
|
52
|
+
Access-Control-Allow-Headers:
|
53
|
+
- Content-Type, Authorization
|
54
|
+
Access-Control-Allow-Methods:
|
55
|
+
- GET, POST, DELETE
|
56
|
+
X-Dm-Page:
|
57
|
+
- us.rest.rest_api
|
58
|
+
Via:
|
59
|
+
- 1.1 varnish
|
60
|
+
- 1.1 varnish
|
61
|
+
Fastly-Debug-Digest:
|
62
|
+
- 3553012804c358303689e11ec92c5f0012bb9c79e3360e85b4454ccedf666ef9
|
63
|
+
Content-Length:
|
64
|
+
- '441'
|
65
|
+
Accept-Ranges:
|
66
|
+
- bytes
|
67
|
+
Date:
|
68
|
+
- Thu, 05 May 2016 01:01:44 GMT
|
69
|
+
Age:
|
70
|
+
- '0'
|
71
|
+
Connection:
|
72
|
+
- keep-alive
|
73
|
+
X-Served-By:
|
74
|
+
- cache-fra1238-FRA, cache-sjc3128-SJC
|
75
|
+
X-Cache:
|
76
|
+
- MISS, HIT
|
77
|
+
X-Cache-Hits:
|
78
|
+
- 0, 1
|
79
|
+
Vary:
|
80
|
+
- X-DM-EC-Geo-Country, Accept-Encoding
|
81
|
+
X-Dm-Backnode-Response-Time:
|
82
|
+
- '0'
|
83
|
+
X-Dm-Cache-Status:
|
84
|
+
- HIT
|
85
|
+
X-Dm-Edge:
|
86
|
+
- Fastly
|
87
|
+
body:
|
88
|
+
encoding: ASCII-8BIT
|
89
|
+
string: '{"id":"x7lni3","title":"Mario Kart (R\u00e9mi Gaillard)","description":"Super
|
90
|
+
R\u00e9mi Kart est un jeu vid\u00e9o de course d\u00e9velopp\u00e9 et \u00e9dit\u00e9
|
91
|
+
par N''Importe Quoi TV. Sa principale originalit\u00e9 vient de sa r\u00e9alit\u00e9...<br
|
92
|
+
\/>L''aventure continue sur www.nimportequi.com","duration":136,"created_time":1228321771,"url":"http:\/\/www.dailymotion.com\/video\/x7lni3_mario-kart-remi-gaillard_fun","views_total":10300359,"tags":["r\u00e9mi","remi","gaillard","imposteur","imposture","mario","bros","kart","nintendo","jeux"],"thumbnail_url":"http:\/\/s2.dmcdn.net\/BgWxI.jpg","thumbnail_720_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x720-YcV.jpg","thumbnail_240_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x240-b83.jpg","thumbnail_60_url":"http:\/\/s2.dmcdn.net\/BgWxI\/x60-kbf.jpg"}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 05 May 2016 01:01:43 GMT
|
95
|
+
recorded_with: VCR 3.0.1
|