video_info 2.7.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/unit_test.yml +42 -0
- data/Guardfile +1 -1
- data/README.md +8 -19
- data/lib/video_info/provider.rb +11 -2
- data/lib/video_info/providers/vimeo_api.rb +9 -3
- data/lib/video_info/providers/vimeo_scraper.rb +12 -2
- data/lib/video_info/providers/youtube.rb +8 -0
- data/lib/video_info/providers/youtube_api.rb +1 -2
- data/lib/video_info/providers/youtube_scraper.rb +43 -25
- data/lib/video_info/providers/youtubeplaylist_api.rb +15 -1
- data/lib/video_info/version.rb +1 -1
- data/lib/video_info.rb +3 -3
- data/tmp/rspec_guard_result +25 -0
- data/video_info.gemspec +5 -6
- metadata +16 -472
- data/.travis.yml +0 -21
- data/lib/video_info/providers/vkontakte.rb +0 -212
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +0 -93
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -96
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_19_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_20_1.yml +0 -100
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +0 -65
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +0 -124
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +0 -67
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +0 -67
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_18_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_18_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_17_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_17_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_19_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_19_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +0 -226
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +0 -226
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_16_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_16_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_20_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_20_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +0 -150
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/1_12_1_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail/2_12_1_1.yml +0 -75
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/1_12_2_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_large/2_12_2_1.yml +0 -75
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/1_12_3_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_medium/2_12_3_1.yml +0 -75
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/1_12_4_1.yml +0 -222
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_193970014/thumbnail_small/2_12_4_1.yml +0 -75
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_hashes/available_/1_2_6_1_1.yml +0 -86
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_invalid_video/available_/1_2_2_1_1.yml +0 -50
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_private_video/available_/1_2_3_1_1.yml +0 -132
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect/available_/1_2_4_1_1.yml +0 -134
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_redirect_to_main_page_for_auth/available_/1_2_5_1_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/_available_/with_valid_video/available_/1_2_1_1_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author/1_5_14_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_thumbnail/1_5_15_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/author_url/1_5_16_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/description/1_5_8_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/duration/1_5_10_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_code/1_5_6_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/embed_url/1_5_5_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/height/1_5_12_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/thumbnail_small/1_5_18_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/title/1_5_7_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/view_count/1_5_13_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_from_kirill_lyanoi_z_video2152699_168591741_2F56fd229a9dfe2dcdbe/width/1_5_11_1.yml +0 -50
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/author/1_3_7_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/embed_code/1_3_6_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/embed_url/1_3_5_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_https_/vk_com/id44052340_z_video61291456_159590018_2F2521d92730a272a9ea/title/1_3_4_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/1_7_4_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video3552522_171340713/embed_url/1_10_1_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/description/1_6_8_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/duration/1_6_10_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_code/1_6_6_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/embed_url/1_6_5_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/height/1_6_12_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/title/1_6_7_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/view_count/1_6_13_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_161598544/width/1_6_11_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author/1_4_5_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_thumbnail/1_4_6_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/author_url/1_4_7_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_videos43640822_/video43640822_168790809/title/1_4_4_1.yml +0 -48
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +0 -67
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -69
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_13_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/foo/_available/1_2_2_1_1.yml +0 -1447
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/foo/_available/2_2_2_1_1.yml +0 -156
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +0 -481
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_3_1_1.yml +0 -485
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_3_1_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +0 -481
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_3_11_1.yml +0 -481
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_3_11_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +0 -483
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_3_8_1.yml +0 -483
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_3_8_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +0 -485
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_3_10_1.yml +0 -484
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_3_10_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +0 -485
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_3_9_1.yml +0 -484
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_3_9_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +0 -481
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_3_7_1.yml +0 -484
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_3_7_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_17_1.yml +0 -485
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_3_17_1.yml +0 -485
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_17_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_3_17_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +0 -483
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_4_1_1.yml +0 -484
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_4_1_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +0 -178
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_16_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_16_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +0 -208
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +0 -208
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +0 -178
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_20_1.yml +0 -56
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_20_1.yml +0 -125
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +0 -60
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/2_2_2_1_1.yml +0 -60
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +0 -94
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/2_2_3_1_1.yml +0 -94
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +0 -94
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/2_2_1_1_1.yml +0 -94
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_19_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/2_3_19_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_20_1.yml +0 -189
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/2_3_20_1.yml +0 -189
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_21_1.yml +0 -189
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/2_3_21_1.yml +0 -189
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/2_3_7_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/2_3_8_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_16_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/2_3_16_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/2_3_15_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/2_3_14_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/2_3_13_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/2_3_6_1.yml +0 -105
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +0 -265
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +0 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +0 -54
- data/spec/lib/video_info/provider_spec.rb +0 -80
- data/spec/lib/video_info/providers/dailymotion_spec.rb +0 -194
- data/spec/lib/video_info/providers/vimeo_spec.rb +0 -328
- data/spec/lib/video_info/providers/vkontakte_spec.rb +0 -236
- data/spec/lib/video_info/providers/wistia_spec.rb +0 -197
- data/spec/lib/video_info/providers/youtube_playlist_spec.rb +0 -236
- data/spec/lib/video_info/providers/youtube_scraper_spec.rb +0 -12
- data/spec/lib/video_info/providers/youtube_spec.rb +0 -575
- data/spec/lib/video_info_spec.rb +0 -106
- data/spec/spec_helper.rb +0 -26
@@ -1,265 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet&playlistId=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- VideoInfo/2.7
|
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
|
-
Expires:
|
22
|
-
- Mon, 27 Mar 2017 21:01:56 GMT
|
23
|
-
Date:
|
24
|
-
- Mon, 27 Mar 2017 21:01:56 GMT
|
25
|
-
Cache-Control:
|
26
|
-
- private, max-age=0, must-revalidate, no-transform
|
27
|
-
Etag:
|
28
|
-
- '"uQc-MPTsstrHkQcRXL3IWLmeNsM/I7dn05_GRjG6Rbl68K-7WAf9Zak"'
|
29
|
-
Vary:
|
30
|
-
- Origin
|
31
|
-
- X-Origin
|
32
|
-
Content-Type:
|
33
|
-
- application/json; charset=UTF-8
|
34
|
-
X-Content-Type-Options:
|
35
|
-
- nosniff
|
36
|
-
X-Frame-Options:
|
37
|
-
- SAMEORIGIN
|
38
|
-
X-Xss-Protection:
|
39
|
-
- 1; mode=block
|
40
|
-
Content-Length:
|
41
|
-
- '6194'
|
42
|
-
Server:
|
43
|
-
- GSE
|
44
|
-
Alt-Svc:
|
45
|
-
- quic=":443"; ma=2592000; v="37,36,35"
|
46
|
-
body:
|
47
|
-
encoding: UTF-8
|
48
|
-
string: |
|
49
|
-
{
|
50
|
-
"items": [
|
51
|
-
{
|
52
|
-
"kind": "youtube#playlistItem",
|
53
|
-
"etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/CckQjG1ENeGrjHXXbCkMyw56N6Y\"",
|
54
|
-
"id": "UEw5aFcxdVM2SFVmdExkSEk2UklzYWYtaVhUbTA5cW5Fci41MzJCQjBCNDIyRkJDN0VD",
|
55
|
-
"snippet": {
|
56
|
-
"publishedAt": "2015-04-22T21:47:21.000Z",
|
57
|
-
"channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
|
58
|
-
"title": "Account termination on YouTube",
|
59
|
-
"description": "Learn more about account termination in the YouTube Help Center: https://support.google.com/youtube/answer/2802168",
|
60
|
-
"thumbnails": {
|
61
|
-
"default": {
|
62
|
-
"url": "https://i.ytimg.com/vi/Oi67QjrXy2w/default.jpg",
|
63
|
-
"width": 120,
|
64
|
-
"height": 90
|
65
|
-
},
|
66
|
-
"medium": {
|
67
|
-
"url": "https://i.ytimg.com/vi/Oi67QjrXy2w/mqdefault.jpg",
|
68
|
-
"width": 320,
|
69
|
-
"height": 180
|
70
|
-
},
|
71
|
-
"high": {
|
72
|
-
"url": "https://i.ytimg.com/vi/Oi67QjrXy2w/hqdefault.jpg",
|
73
|
-
"width": 480,
|
74
|
-
"height": 360
|
75
|
-
},
|
76
|
-
"standard": {
|
77
|
-
"url": "https://i.ytimg.com/vi/Oi67QjrXy2w/sddefault.jpg",
|
78
|
-
"width": 640,
|
79
|
-
"height": 480
|
80
|
-
},
|
81
|
-
"maxres": {
|
82
|
-
"url": "https://i.ytimg.com/vi/Oi67QjrXy2w/maxresdefault.jpg",
|
83
|
-
"width": 1280,
|
84
|
-
"height": 720
|
85
|
-
}
|
86
|
-
},
|
87
|
-
"channelTitle": "YouTube Help",
|
88
|
-
"playlistId": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
|
89
|
-
"position": 0,
|
90
|
-
"resourceId": {
|
91
|
-
"kind": "youtube#video",
|
92
|
-
"videoId": "Oi67QjrXy2w"
|
93
|
-
}
|
94
|
-
}
|
95
|
-
},
|
96
|
-
{
|
97
|
-
"kind": "youtube#playlistItem",
|
98
|
-
"etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/7uNlnnzetzxOAgbocO_UEYRKP-8\"",
|
99
|
-
"id": "UEw5aFcxdVM2SFVmdExkSEk2UklzYWYtaVhUbTA5cW5Fci5DQUNERDQ2NkIzRUQxNTY1",
|
100
|
-
"snippet": {
|
101
|
-
"publishedAt": "2015-04-22T21:48:43.000Z",
|
102
|
-
"channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
|
103
|
-
"title": "YouTube Copyright Basics",
|
104
|
-
"description": "",
|
105
|
-
"thumbnails": {
|
106
|
-
"default": {
|
107
|
-
"url": "https://i.ytimg.com/vi/OQVHWsTHcoc/default.jpg",
|
108
|
-
"width": 120,
|
109
|
-
"height": 90
|
110
|
-
},
|
111
|
-
"medium": {
|
112
|
-
"url": "https://i.ytimg.com/vi/OQVHWsTHcoc/mqdefault.jpg",
|
113
|
-
"width": 320,
|
114
|
-
"height": 180
|
115
|
-
},
|
116
|
-
"high": {
|
117
|
-
"url": "https://i.ytimg.com/vi/OQVHWsTHcoc/hqdefault.jpg",
|
118
|
-
"width": 480,
|
119
|
-
"height": 360
|
120
|
-
},
|
121
|
-
"standard": {
|
122
|
-
"url": "https://i.ytimg.com/vi/OQVHWsTHcoc/sddefault.jpg",
|
123
|
-
"width": 640,
|
124
|
-
"height": 480
|
125
|
-
}
|
126
|
-
},
|
127
|
-
"channelTitle": "YouTube Help",
|
128
|
-
"playlistId": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
|
129
|
-
"position": 1,
|
130
|
-
"resourceId": {
|
131
|
-
"kind": "youtube#video",
|
132
|
-
"videoId": "OQVHWsTHcoc"
|
133
|
-
}
|
134
|
-
}
|
135
|
-
},
|
136
|
-
{
|
137
|
-
"kind": "youtube#playlistItem",
|
138
|
-
"etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/jw4lwO4cFZlMCF64f2m5f-jg9JM\"",
|
139
|
-
"id": "UEw5aFcxdVM2SFVmdExkSEk2UklzYWYtaVhUbTA5cW5Fci4wOTA3OTZBNzVEMTUzOTMy",
|
140
|
-
"snippet": {
|
141
|
-
"publishedAt": "2013-09-13T16:49:50.000Z",
|
142
|
-
"channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
|
143
|
-
"title": "Buying YouTube views through third-party services",
|
144
|
-
"description": "To learn more please visit the YouTube Help Center: https://www.youtube.com/help",
|
145
|
-
"thumbnails": {
|
146
|
-
"default": {
|
147
|
-
"url": "https://i.ytimg.com/vi/_Bt3-WsHfB0/default.jpg",
|
148
|
-
"width": 120,
|
149
|
-
"height": 90
|
150
|
-
},
|
151
|
-
"medium": {
|
152
|
-
"url": "https://i.ytimg.com/vi/_Bt3-WsHfB0/mqdefault.jpg",
|
153
|
-
"width": 320,
|
154
|
-
"height": 180
|
155
|
-
},
|
156
|
-
"high": {
|
157
|
-
"url": "https://i.ytimg.com/vi/_Bt3-WsHfB0/hqdefault.jpg",
|
158
|
-
"width": 480,
|
159
|
-
"height": 360
|
160
|
-
},
|
161
|
-
"standard": {
|
162
|
-
"url": "https://i.ytimg.com/vi/_Bt3-WsHfB0/sddefault.jpg",
|
163
|
-
"width": 640,
|
164
|
-
"height": 480
|
165
|
-
},
|
166
|
-
"maxres": {
|
167
|
-
"url": "https://i.ytimg.com/vi/_Bt3-WsHfB0/maxresdefault.jpg",
|
168
|
-
"width": 1280,
|
169
|
-
"height": 720
|
170
|
-
}
|
171
|
-
},
|
172
|
-
"channelTitle": "YouTube Help",
|
173
|
-
"playlistId": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
|
174
|
-
"position": 2,
|
175
|
-
"resourceId": {
|
176
|
-
"kind": "youtube#video",
|
177
|
-
"videoId": "_Bt3-WsHfB0"
|
178
|
-
}
|
179
|
-
}
|
180
|
-
},
|
181
|
-
{
|
182
|
-
"kind": "youtube#playlistItem",
|
183
|
-
"etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/vcBVlTuT5TB_QWXaTDCcvOrFGhI\"",
|
184
|
-
"id": "UEw5aFcxdVM2SFVmdExkSEk2UklzYWYtaVhUbTA5cW5Fci4wMTcyMDhGQUE4NTIzM0Y5",
|
185
|
-
"snippet": {
|
186
|
-
"publishedAt": "2013-08-09T05:09:51.000Z",
|
187
|
-
"channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
|
188
|
-
"title": "YouTube Content ID",
|
189
|
-
"description": "",
|
190
|
-
"thumbnails": {
|
191
|
-
"default": {
|
192
|
-
"url": "https://i.ytimg.com/vi/9g2U12SsRns/default.jpg",
|
193
|
-
"width": 120,
|
194
|
-
"height": 90
|
195
|
-
},
|
196
|
-
"medium": {
|
197
|
-
"url": "https://i.ytimg.com/vi/9g2U12SsRns/mqdefault.jpg",
|
198
|
-
"width": 320,
|
199
|
-
"height": 180
|
200
|
-
},
|
201
|
-
"high": {
|
202
|
-
"url": "https://i.ytimg.com/vi/9g2U12SsRns/hqdefault.jpg",
|
203
|
-
"width": 480,
|
204
|
-
"height": 360
|
205
|
-
}
|
206
|
-
},
|
207
|
-
"channelTitle": "YouTube Help",
|
208
|
-
"playlistId": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
|
209
|
-
"position": 3,
|
210
|
-
"resourceId": {
|
211
|
-
"kind": "youtube#video",
|
212
|
-
"videoId": "9g2U12SsRns"
|
213
|
-
}
|
214
|
-
}
|
215
|
-
},
|
216
|
-
{
|
217
|
-
"kind": "youtube#playlistItem",
|
218
|
-
"etag": "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/191Hb3um-8_q4QBsjYDqsEZaKy4\"",
|
219
|
-
"id": "UEw5aFcxdVM2SFVmdExkSEk2UklzYWYtaVhUbTA5cW5Fci4yODlGNEE0NkRGMEEzMEQy",
|
220
|
-
"snippet": {
|
221
|
-
"publishedAt": "2013-08-09T05:09:51.000Z",
|
222
|
-
"channelId": "UCMDQxm7cUx3yXkfeHa5zJIQ",
|
223
|
-
"title": "Reporting and Policy Enforcement on YouTube",
|
224
|
-
"description": "To learn more please visit the YouTube Help Center: https://www.youtube.com/help",
|
225
|
-
"thumbnails": {
|
226
|
-
"default": {
|
227
|
-
"url": "https://i.ytimg.com/vi/6c3mHikRz0I/default.jpg",
|
228
|
-
"width": 120,
|
229
|
-
"height": 90
|
230
|
-
},
|
231
|
-
"medium": {
|
232
|
-
"url": "https://i.ytimg.com/vi/6c3mHikRz0I/mqdefault.jpg",
|
233
|
-
"width": 320,
|
234
|
-
"height": 180
|
235
|
-
},
|
236
|
-
"high": {
|
237
|
-
"url": "https://i.ytimg.com/vi/6c3mHikRz0I/hqdefault.jpg",
|
238
|
-
"width": 480,
|
239
|
-
"height": 360
|
240
|
-
},
|
241
|
-
"standard": {
|
242
|
-
"url": "https://i.ytimg.com/vi/6c3mHikRz0I/sddefault.jpg",
|
243
|
-
"width": 640,
|
244
|
-
"height": 480
|
245
|
-
},
|
246
|
-
"maxres": {
|
247
|
-
"url": "https://i.ytimg.com/vi/6c3mHikRz0I/maxresdefault.jpg",
|
248
|
-
"width": 1280,
|
249
|
-
"height": 720
|
250
|
-
}
|
251
|
-
},
|
252
|
-
"channelTitle": "YouTube Help",
|
253
|
-
"playlistId": "PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr",
|
254
|
-
"position": 4,
|
255
|
-
"resourceId": {
|
256
|
-
"kind": "youtube#video",
|
257
|
-
"videoId": "6c3mHikRz0I"
|
258
|
-
}
|
259
|
-
}
|
260
|
-
}
|
261
|
-
]
|
262
|
-
}
|
263
|
-
http_version:
|
264
|
-
recorded_at: Mon, 27 Mar 2017 21:01:56 GMT
|
265
|
-
recorded_with: VCR 3.0.3
|
@@ -1,54 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet&playlistId=PL0E8117603D70E10A
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- VideoInfo/2.7
|
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
|
-
Expires:
|
22
|
-
- Mon, 27 Mar 2017 21:01:56 GMT
|
23
|
-
Date:
|
24
|
-
- Mon, 27 Mar 2017 21:01:56 GMT
|
25
|
-
Cache-Control:
|
26
|
-
- private, max-age=0, must-revalidate, no-transform
|
27
|
-
Etag:
|
28
|
-
- '"uQc-MPTsstrHkQcRXL3IWLmeNsM/ewwRz0VbTYpp2EGbOkvZ5M_1mbo"'
|
29
|
-
Vary:
|
30
|
-
- Origin
|
31
|
-
- X-Origin
|
32
|
-
Content-Type:
|
33
|
-
- application/json; charset=UTF-8
|
34
|
-
X-Content-Type-Options:
|
35
|
-
- nosniff
|
36
|
-
X-Frame-Options:
|
37
|
-
- SAMEORIGIN
|
38
|
-
X-Xss-Protection:
|
39
|
-
- 1; mode=block
|
40
|
-
Content-Length:
|
41
|
-
- '17'
|
42
|
-
Server:
|
43
|
-
- GSE
|
44
|
-
Alt-Svc:
|
45
|
-
- quic=":443"; ma=2592000; v="37,36,35"
|
46
|
-
body:
|
47
|
-
encoding: UTF-8
|
48
|
-
string: |
|
49
|
-
{
|
50
|
-
"items": []
|
51
|
-
}
|
52
|
-
http_version:
|
53
|
-
recorded_at: Mon, 27 Mar 2017 21:01:56 GMT
|
54
|
-
recorded_with: VCR 3.0.3
|
@@ -1,54 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://www.googleapis.com/youtube/v3/playlistItems?fields=items&key=AIzaSyA6PYwSr1EnLFUFy1cZDk3Ifb0rxeJaeZ0&part=snippet&playlistId=PL0E8117603D70E10A
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- VideoInfo/2.7
|
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
|
-
Expires:
|
22
|
-
- Mon, 27 Mar 2017 21:01:58 GMT
|
23
|
-
Date:
|
24
|
-
- Mon, 27 Mar 2017 21:01:58 GMT
|
25
|
-
Cache-Control:
|
26
|
-
- private, max-age=0, must-revalidate, no-transform
|
27
|
-
Etag:
|
28
|
-
- '"uQc-MPTsstrHkQcRXL3IWLmeNsM/ewwRz0VbTYpp2EGbOkvZ5M_1mbo"'
|
29
|
-
Vary:
|
30
|
-
- Origin
|
31
|
-
- X-Origin
|
32
|
-
Content-Type:
|
33
|
-
- application/json; charset=UTF-8
|
34
|
-
X-Content-Type-Options:
|
35
|
-
- nosniff
|
36
|
-
X-Frame-Options:
|
37
|
-
- SAMEORIGIN
|
38
|
-
X-Xss-Protection:
|
39
|
-
- 1; mode=block
|
40
|
-
Content-Length:
|
41
|
-
- '17'
|
42
|
-
Server:
|
43
|
-
- GSE
|
44
|
-
Alt-Svc:
|
45
|
-
- quic=":443"; ma=2592000; v="37,36,35"
|
46
|
-
body:
|
47
|
-
encoding: UTF-8
|
48
|
-
string: |
|
49
|
-
{
|
50
|
-
"items": []
|
51
|
-
}
|
52
|
-
http_version:
|
53
|
-
recorded_at: Mon, 27 Mar 2017 21:01:58 GMT
|
54
|
-
recorded_with: VCR 3.0.3
|
@@ -1,80 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe VideoInfo::Provider do
|
4
|
-
class ProviderFu < VideoInfo::Provider
|
5
|
-
def _url_regex
|
6
|
-
%r{foo\/(\d)}
|
7
|
-
end
|
8
|
-
|
9
|
-
def embed_url
|
10
|
-
'//foo.com'
|
11
|
-
end
|
12
|
-
|
13
|
-
def _default_url_attributes; {} end
|
14
|
-
|
15
|
-
def _default_iframe_attributes; {} end
|
16
|
-
end
|
17
|
-
let(:url) { 'url' }
|
18
|
-
let(:options) { {} }
|
19
|
-
let(:provider) { ProviderFu.new('foo/1', options) }
|
20
|
-
|
21
|
-
describe 'initialize' do
|
22
|
-
it 'should raise error if #_url_regex is not implemented' do
|
23
|
-
error_msg = 'Provider class must implement #_url_regex private method'
|
24
|
-
expected = expect { VideoInfo::Provider.new(url) }
|
25
|
-
expected.to raise_error(NotImplementedError, error_msg)
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'should raise error if #_api_url is not implemented' do
|
29
|
-
api_url_error_msg = 'Provider class must implement ' \
|
30
|
-
'#_api_url private method'
|
31
|
-
expected = expect { provider.data }
|
32
|
-
expected.to raise_error(NotImplementedError, api_url_error_msg)
|
33
|
-
end
|
34
|
-
|
35
|
-
it 'sets default user_agent options' do
|
36
|
-
user_agent_hash = { 'User-Agent' => "VideoInfo/#{VideoInfo::VERSION}" }
|
37
|
-
expect(provider.options).to eq(user_agent_hash)
|
38
|
-
end
|
39
|
-
|
40
|
-
context 'with custom User-Agent options' do
|
41
|
-
let(:options) { { 'User-Agent' => 'Test User Agent / 1.0' } }
|
42
|
-
|
43
|
-
it 'sets the option' do
|
44
|
-
expect(provider.options).to eq('User-Agent' => 'Test User Agent / 1.0')
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
context 'with Referer options' do
|
49
|
-
let(:options) { { referer: 'http://google.com' } }
|
50
|
-
|
51
|
-
it 'sets the option' do
|
52
|
-
expect(provider.options).to include('Referer' => 'http://google.com')
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
describe 'embed_code' do
|
58
|
-
it 'supports url_attributes option' do
|
59
|
-
embed_str = '<iframe src="//foo.com?foo=bar" frameborder="0"></iframe>'
|
60
|
-
expected = expect(provider.embed_code(url_attributes: { foo: 'bar' }))
|
61
|
-
expected.to eq embed_str
|
62
|
-
end
|
63
|
-
|
64
|
-
it 'supports url_attributes option' do
|
65
|
-
embed_str = '<iframe src="//foo.com" frameborder="0" foo="bar"></iframe>'
|
66
|
-
expected = expect(provider.embed_code(iframe_attributes: { foo: 'bar' }))
|
67
|
-
expected.to eq embed_str
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
describe '.usable?' do
|
72
|
-
it 'should raise eror if not usable' do
|
73
|
-
error_msg = 'Provider class must implement .usable? public method'
|
74
|
-
expected = expect do
|
75
|
-
VideoInfo::Provider.usable?('url')
|
76
|
-
end
|
77
|
-
expected.to raise_error(NotImplementedError, error_msg)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,194 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe VideoInfo::Providers::Dailymotion do
|
5
|
-
describe '.usable?' do
|
6
|
-
subject { VideoInfo::Providers::Dailymotion.usable?(url) }
|
7
|
-
|
8
|
-
context 'with dailymotion url' do
|
9
|
-
let(:url) { 'http://www.dailymotion.com/video/x7lni3' }
|
10
|
-
it { is_expected.to be_truthy }
|
11
|
-
end
|
12
|
-
|
13
|
-
context 'with dai.ly url' do
|
14
|
-
let(:url) { 'http://dai.ly/video/x7lni3' }
|
15
|
-
it { is_expected.to be_truthy }
|
16
|
-
end
|
17
|
-
|
18
|
-
context 'with other url' do
|
19
|
-
let(:url) { 'http://www.youtube.com/x7lni3' }
|
20
|
-
it { is_expected.to be_falsey }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#available?' do
|
25
|
-
context 'with valid video', :vcr do
|
26
|
-
subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3'.freeze) }
|
27
|
-
|
28
|
-
describe '#available?' do
|
29
|
-
subject { super().available? }
|
30
|
-
it { is_expected.to be_truthy }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
context 'with invalid video url', :vcr do
|
35
|
-
subject { VideoInfo.new('http://www.dailymotion.com/video/inValIdiD') }
|
36
|
-
|
37
|
-
describe '#available?' do
|
38
|
-
subject { super().available? }
|
39
|
-
it { is_expected.to be_falsey }
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
context 'with video x7lni3', :vcr do
|
45
|
-
subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3') }
|
46
|
-
|
47
|
-
describe '#provider' do
|
48
|
-
subject { super().provider }
|
49
|
-
it { is_expected.to eq 'Dailymotion' }
|
50
|
-
end
|
51
|
-
|
52
|
-
describe '#video_id' do
|
53
|
-
subject { super().video_id }
|
54
|
-
it { is_expected.to eq 'x7lni3' }
|
55
|
-
end
|
56
|
-
|
57
|
-
describe '#url' do
|
58
|
-
subject { super().url }
|
59
|
-
it { is_expected.to eq 'http://www.dailymotion.com/video/x7lni3' }
|
60
|
-
end
|
61
|
-
|
62
|
-
describe '#embed_url' do
|
63
|
-
subject { super().embed_url }
|
64
|
-
it { is_expected.to eq '//www.dailymotion.com/embed/video/x7lni3' }
|
65
|
-
end
|
66
|
-
|
67
|
-
describe '#embed_code' do
|
68
|
-
subject { super().embed_code }
|
69
|
-
embed_code = '<iframe src="//www.dailymotion.com/embed/video/x7lni3?' \
|
70
|
-
'autoplay=0" frameborder="0"></iframe>'
|
71
|
-
it { is_expected.to eq embed_code }
|
72
|
-
end
|
73
|
-
|
74
|
-
describe '#title' do
|
75
|
-
subject { super().title }
|
76
|
-
it { is_expected.to eq 'Mario Kart (Rémi Gaillard)' }
|
77
|
-
end
|
78
|
-
|
79
|
-
describe '#author' do
|
80
|
-
subject { super().author }
|
81
|
-
it { is_expected.to eq 'Rémi Gaillard' }
|
82
|
-
end
|
83
|
-
|
84
|
-
describe '#author_url' do
|
85
|
-
subject { super().author_url }
|
86
|
-
it { is_expected.to eq 'http://www.dailymotion.com/nqtv' }
|
87
|
-
end
|
88
|
-
|
89
|
-
describe '#author_thumbnail' do
|
90
|
-
subject { super().author_thumbnail }
|
91
|
-
it { is_expected.to eq 'http://s2.dmcdn.net/HN6TP/60x60-lEL.jpg' }
|
92
|
-
end
|
93
|
-
|
94
|
-
describe '#description' do
|
95
|
-
subject { super().description }
|
96
|
-
description_text = 'Super Rémi Kart est un jeu vidéo de course ' \
|
97
|
-
'développé et édité par N\'Importe Quoi TV. ' \
|
98
|
-
'Sa principale originalité vient de sa réalité' \
|
99
|
-
'...<br />L\'aventure continue sur www.nimportequi.com'
|
100
|
-
it { is_expected.to eq description_text }
|
101
|
-
end
|
102
|
-
|
103
|
-
describe '#keywords' do
|
104
|
-
subject { super().keywords }
|
105
|
-
keywords_list = %w(rémi remi gaillard imposteur imposture
|
106
|
-
mario bros kart nintendo jeux)
|
107
|
-
it { is_expected.to eq keywords_list }
|
108
|
-
end
|
109
|
-
|
110
|
-
describe '#duration' do
|
111
|
-
subject { super().duration }
|
112
|
-
it { is_expected.to eq 136 }
|
113
|
-
end
|
114
|
-
|
115
|
-
describe '#width' do
|
116
|
-
subject { super().width }
|
117
|
-
it { is_expected.to be_nil }
|
118
|
-
end
|
119
|
-
|
120
|
-
describe '#height' do
|
121
|
-
subject { super().height }
|
122
|
-
it { is_expected.to be_nil }
|
123
|
-
end
|
124
|
-
|
125
|
-
describe '#date' do
|
126
|
-
subject { super().date }
|
127
|
-
it 'should show correct date' do
|
128
|
-
is_expected.to eq Time.parse('2008-12-03 16:29:31 UTC', Time.now.utc)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
describe '#thumbnail_small' do
|
133
|
-
subject { super().thumbnail_small }
|
134
|
-
it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x60-kbf.jpg' }
|
135
|
-
end
|
136
|
-
|
137
|
-
describe '#thumbnail_medium' do
|
138
|
-
subject { super().thumbnail_medium }
|
139
|
-
it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x240-b83.jpg' }
|
140
|
-
end
|
141
|
-
|
142
|
-
describe '#thumbnail_large' do
|
143
|
-
subject { super().thumbnail_large }
|
144
|
-
it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x720-YcV.jpg' }
|
145
|
-
end
|
146
|
-
|
147
|
-
describe '#thumbnail' do
|
148
|
-
subject { super().thumbnail }
|
149
|
-
it { is_expected.to eq 'http://s2.dmcdn.net/BgWxI/x720-YcV.jpg' }
|
150
|
-
end
|
151
|
-
|
152
|
-
describe '#view_count' do
|
153
|
-
subject { super().view_count }
|
154
|
-
it { is_expected.to be > 10_000_000 }
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
context 'with video x7lni3 and url_attributes', :vcr do
|
159
|
-
subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3') }
|
160
|
-
|
161
|
-
it do
|
162
|
-
embed_code = subject.embed_code(url_attributes: { autoplay: 1 })
|
163
|
-
expect(embed_code).to match(/autoplay=1/)
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
context 'with video x7lni3 and iframe_attributes', :vcr do
|
168
|
-
subject { VideoInfo.new('http://www.dailymotion.com/video/x7lni3') }
|
169
|
-
|
170
|
-
it 'should properly apply dimensions attributes' do
|
171
|
-
dimensions = { width: 800, height: 600 }
|
172
|
-
embed_code = subject.embed_code(iframe_attributes: dimensions)
|
173
|
-
expect(embed_code).to match(/width="800"/)
|
174
|
-
expect(embed_code).to match(/height="600"/)
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
context 'with video x7lni3 in text', :vcr do
|
179
|
-
url_in_text = '<a href="http://www.dailymotion.com/video/x7lni3">' \
|
180
|
-
'http://www.dailymotion.com/video/x7lni3</a>'
|
181
|
-
|
182
|
-
subject { VideoInfo.new(url_in_text) }
|
183
|
-
|
184
|
-
describe '#provider' do
|
185
|
-
subject { super().provider }
|
186
|
-
it { is_expected.to eq 'Dailymotion' }
|
187
|
-
end
|
188
|
-
|
189
|
-
describe '#video_id' do
|
190
|
-
subject { super().video_id }
|
191
|
-
it { is_expected.to eq 'x7lni3' }
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|