video_info 2.8.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/unit_test.yml +39 -0
- data/Guardfile +1 -1
- data/README.md +8 -21
- data/lib/video_info.rb +2 -3
- data/lib/video_info/provider.rb +3 -2
- data/lib/video_info/providers/vimeo_scraper.rb +12 -2
- data/lib/video_info/providers/youtube.rb +4 -0
- data/lib/video_info/providers/youtube_api.rb +1 -1
- data/lib/video_info/providers/youtube_scraper.rb +42 -25
- data/lib/video_info/providers/youtubeplaylist_api.rb +15 -1
- 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 +26 -37
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +26 -35
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/{1_3_19_1.yml → 1_3_21_1.yml} +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/{1_3_20_1.yml → 1_3_22_1.yml} +31 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +38 -37
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +28 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +44 -41
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +26 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +46 -38
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +24 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +33 -31
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +33 -31
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +32 -28
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +33 -31
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +34 -34
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +33 -30
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +34 -32
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +33 -30
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +34 -34
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +34 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +34 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +34 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +33 -31
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +34 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +34 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_20_1.yml +158 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_20_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_19_1.yml +158 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_19_1.yml +85 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_21_1.yml +159 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_21_1.yml +80 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +82 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +44 -34
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +36 -35
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +45 -37
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +39 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +46 -38
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +36 -35
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +85 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_18_1.yml +236 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_18_1.yml +82 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +67 -53
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +37 -34
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +67 -54
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +37 -32
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +67 -53
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +37 -32
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +45 -36
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +39 -33
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_22_1.yml +158 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_22_1.yml +84 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +46 -40
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +37 -34
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/1_12_1_1.yml +234 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/2_12_1_1.yml +78 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/1_12_2_1.yml +233 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/2_12_2_1.yml +78 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/1_12_3_1.yml +235 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/2_12_3_1.yml +73 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/1_12_4_1.yml +234 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/2_12_4_1.yml +77 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +25 -17
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +28 -18
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +33 -24
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +34 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +33 -24
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +33 -24
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +33 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/{1_3_13_1.yml → 1_3_15_1.yml} +33 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +33 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +33 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +33 -25
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +33 -23
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +20 -442
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +24 -446
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +25 -449
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +24 -450
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +23 -449
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +24 -446
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_18_1.yml +59 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_18_1.yml +114 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +23 -20
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +23 -447
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +81 -21
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_a_video_without_description/_description/1_1_1_1.yml +59 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +181 -110
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +22 -19
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +23 -20
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +23 -20
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +20 -17
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_17_1.yml +59 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_17_1.yml +187 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +74 -15
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +74 -15
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +271 -144
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +21 -18
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +271 -144
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/can_be_called_twice_and_receive_the_same_value.yml +391 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +173 -108
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +23 -19
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +21 -18
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +21 -18
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +23 -20
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +152 -90
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_21_1.yml +59 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_21_1.yml +187 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +87 -27
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +120 -60
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +120 -60
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_21_1.yml +165 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_22_1.yml +274 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_23_1.yml +274 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_18_1.yml +165 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large_2x/1_3_16_1.yml +165 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_maxres/1_3_17_1.yml +165 -0
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +131 -71
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +78 -231
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +81 -21
- data/spec/lib/video_info/providers/dailymotion_spec.rb +6 -6
- data/spec/lib/video_info/providers/vimeo_spec.rb +21 -21
- data/spec/lib/video_info/providers/wistia_spec.rb +6 -6
- data/spec/lib/video_info/providers/youtube_playlist_spec.rb +22 -28
- data/spec/lib/video_info/providers/youtube_scraper_spec.rb +4 -2
- data/spec/lib/video_info/providers/youtube_spec.rb +28 -26
- data/spec/lib/video_info_spec.rb +0 -4
- data/spec/spec_helper.rb +6 -1
- data/tmp/rspec_guard_result +25 -0
- data/video_info.gemspec +4 -4
- metadata +85 -215
- data/.travis.yml +0 -21
- data/lib/video_info/providers/vkontakte.rb +0 -208
- 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/_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/_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_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_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_3_1_1.yml +0 -485
- 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_3_11_1.yml +0 -481
- 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_3_8_1.yml +0 -483
- 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_3_10_1.yml +0 -484
- 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_3_9_1.yml +0 -484
- 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_3_7_1.yml +0 -484
- 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_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_4_1_1.yml +0 -54
- 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/_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_/2_2_2_1_1.yml +0 -60
- 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_/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/2_3_7_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/2_3_15_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/2_3_13_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_that_does_not_exist_in_embed_path/_videos/2_4_2_1.yml +0 -54
- data/spec/lib/video_info/providers/vkontakte_spec.rb +0 -236
@@ -83,12 +83,12 @@ describe VideoInfo::Providers::Dailymotion do
|
|
83
83
|
|
84
84
|
describe '#author_url' do
|
85
85
|
subject { super().author_url }
|
86
|
-
it { is_expected.to eq '
|
86
|
+
it { is_expected.to eq 'https://www.dailymotion.com/nqtv' }
|
87
87
|
end
|
88
88
|
|
89
89
|
describe '#author_thumbnail' do
|
90
90
|
subject { super().author_thumbnail }
|
91
|
-
it { is_expected.to
|
91
|
+
it { is_expected.to match /https:\/\/s[12].dmcdn.net\/u\/US931VO3V-24wNr1\/60x60/ }
|
92
92
|
end
|
93
93
|
|
94
94
|
describe '#description' do
|
@@ -131,17 +131,17 @@ describe VideoInfo::Providers::Dailymotion do
|
|
131
131
|
|
132
132
|
describe '#thumbnail_small' do
|
133
133
|
subject { super().thumbnail_small }
|
134
|
-
it { is_expected.to
|
134
|
+
it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59OF6TK6\/x60/ }
|
135
135
|
end
|
136
136
|
|
137
137
|
describe '#thumbnail_medium' do
|
138
138
|
subject { super().thumbnail_medium }
|
139
|
-
it { is_expected.to
|
139
|
+
it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59Vm42lt\/x240/ }
|
140
140
|
end
|
141
141
|
|
142
142
|
describe '#thumbnail_large' do
|
143
143
|
subject { super().thumbnail_large }
|
144
|
-
it { is_expected.to
|
144
|
+
it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59VyFzJt\/x720/ }
|
145
145
|
end
|
146
146
|
|
147
147
|
describe '#thumbnail_large_2x' do
|
@@ -156,7 +156,7 @@ describe VideoInfo::Providers::Dailymotion do
|
|
156
156
|
|
157
157
|
describe '#thumbnail' do
|
158
158
|
subject { super().thumbnail }
|
159
|
-
it { is_expected.to
|
159
|
+
it { is_expected.to match /https:\/\/s[12].dmcdn.net\/v\/mj4x1VaO59VyFzJt\/x720/ }
|
160
160
|
end
|
161
161
|
|
162
162
|
describe '#view_count' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
[nil, '
|
4
|
-
describe VideoInfo::Providers::Vimeo do
|
3
|
+
[nil, ENV["VIMEO_ACCESS_TOKEN"] || 'vimeo_access_token'].each do |api_key|
|
4
|
+
describe VideoInfo::Providers::Vimeo, :vcr do
|
5
5
|
before(:all) do
|
6
6
|
VideoInfo.provider_api_keys = { vimeo: api_key }
|
7
7
|
end
|
@@ -47,7 +47,7 @@ require 'spec_helper'
|
|
47
47
|
end
|
48
48
|
|
49
49
|
describe '#available?' do
|
50
|
-
context 'with valid video'
|
50
|
+
context 'with valid video' do
|
51
51
|
subject { VideoInfo.new('http://vimeo.com/98605382'.freeze) }
|
52
52
|
|
53
53
|
describe '#available?' do
|
@@ -55,7 +55,7 @@ require 'spec_helper'
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
context "with 'this video does not exist' video"
|
58
|
+
context "with 'this video does not exist' video" do
|
59
59
|
subject { VideoInfo.new('http://vimeo.com/59312311') }
|
60
60
|
|
61
61
|
describe '#available?' do
|
@@ -63,7 +63,7 @@ require 'spec_helper'
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
context "with 'password required' video"
|
66
|
+
context "with 'password required' video" do
|
67
67
|
subject { VideoInfo.new('http://vimeo.com/74636562') }
|
68
68
|
|
69
69
|
describe '#available?' do
|
@@ -72,7 +72,7 @@ require 'spec_helper'
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
context 'with video 136971428'
|
75
|
+
context 'with video 136971428' do
|
76
76
|
subject { VideoInfo.new('https://vimeo.com/136971428') }
|
77
77
|
|
78
78
|
describe '#provider' do
|
@@ -213,7 +213,7 @@ require 'spec_helper'
|
|
213
213
|
end
|
214
214
|
end
|
215
215
|
|
216
|
-
context 'with video 898029 and url_attributes'
|
216
|
+
context 'with video 898029 and url_attributes' do
|
217
217
|
subject { VideoInfo.new('http://www.vimeo.com/898029') }
|
218
218
|
|
219
219
|
it 'should add URL attribute' do
|
@@ -223,7 +223,7 @@ require 'spec_helper'
|
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
226
|
-
context 'with video 898029 and iframe_attributes'
|
226
|
+
context 'with video 898029 and iframe_attributes' do
|
227
227
|
subject { VideoInfo.new('http://www.vimeo.com/898029') }
|
228
228
|
|
229
229
|
it 'should have proper dimensions' do
|
@@ -234,7 +234,7 @@ require 'spec_helper'
|
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
237
|
-
context 'with video 898029 in /group/ url'
|
237
|
+
context 'with video 898029 in /group/ url' do
|
238
238
|
subject { VideoInfo.new('http://vimeo.com/groups/1234/videos/898029') }
|
239
239
|
|
240
240
|
describe '#provider' do
|
@@ -248,7 +248,7 @@ require 'spec_helper'
|
|
248
248
|
end
|
249
249
|
end
|
250
250
|
|
251
|
-
context 'with video 898029 in /group/ url'
|
251
|
+
context 'with video 898029 in /group/ url' do
|
252
252
|
subject { VideoInfo.new('http://player.vimeo.com/video/898029') }
|
253
253
|
|
254
254
|
describe '#provider' do
|
@@ -262,7 +262,7 @@ require 'spec_helper'
|
|
262
262
|
end
|
263
263
|
end
|
264
264
|
|
265
|
-
context 'with video 898029 in text'
|
265
|
+
context 'with video 898029 in text' do
|
266
266
|
video_url_in_text = '<a href="http://www.vimeo.com/898029">' \
|
267
267
|
'http://www.vimeo.com/898029</a>'
|
268
268
|
subject { VideoInfo.new(video_url_in_text) }
|
@@ -278,14 +278,14 @@ require 'spec_helper'
|
|
278
278
|
end
|
279
279
|
end
|
280
280
|
|
281
|
-
context 'with video 101677664 in /ondemand/ url'
|
281
|
+
context 'with video 101677664 in /ondemand/ url' do
|
282
282
|
subject { VideoInfo.new('https://vimeo.com/ondemand/less/101677664') }
|
283
283
|
|
284
284
|
its(:provider) { should eq 'Vimeo' }
|
285
285
|
its(:video_id) { should eq '101677664' }
|
286
286
|
end
|
287
287
|
|
288
|
-
context 'with video 111431415 in /channels/*/ url'
|
288
|
+
context 'with video 111431415 in /channels/*/ url' do
|
289
289
|
video_url = 'https://vimeo.com/channels/some_channel1/111431415'
|
290
290
|
subject { VideoInfo.new(video_url) }
|
291
291
|
|
@@ -293,7 +293,7 @@ require 'spec_helper'
|
|
293
293
|
its(:video_id) { should eq '111431415' }
|
294
294
|
end
|
295
295
|
|
296
|
-
context 'with video 126641548 in /user*/review/126641548/* url'
|
296
|
+
context 'with video 126641548 in /user*/review/126641548/* url' do
|
297
297
|
video_url = 'http://www.vimeo.com/user39798190/review/126641548/8a56234e32'
|
298
298
|
subject { VideoInfo.new(video_url) }
|
299
299
|
|
@@ -301,18 +301,18 @@ require 'spec_helper'
|
|
301
301
|
its(:video_id) { should eq '126641548' }
|
302
302
|
end
|
303
303
|
|
304
|
-
context 'with video
|
305
|
-
video_url = 'https://vimeo.com/
|
304
|
+
context 'with video 141349194' do
|
305
|
+
video_url = 'https://vimeo.com/141349194'
|
306
306
|
subject { VideoInfo.new(video_url) }
|
307
307
|
|
308
|
-
its(:thumbnail) { should eq 'https://i.vimeocdn.com/video/
|
309
|
-
its(:thumbnail_large) { should eq 'https://i.vimeocdn.com/video/
|
310
|
-
its(:thumbnail_medium) { should eq 'https://i.vimeocdn.com/video/
|
311
|
-
its(:thumbnail_small) { should eq 'https://i.vimeocdn.com/video/
|
308
|
+
its(:thumbnail) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
|
309
|
+
its(:thumbnail_large) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
|
310
|
+
its(:thumbnail_medium) { should eq 'https://i.vimeocdn.com/video/538320894_200x150.jpg' }
|
311
|
+
its(:thumbnail_small) { should eq 'https://i.vimeocdn.com/video/538320894_100x75.jpg' }
|
312
312
|
|
313
313
|
end
|
314
314
|
|
315
|
-
context 'with unavailable video'
|
315
|
+
context 'with unavailable video' do
|
316
316
|
if api_key.nil?
|
317
317
|
video_url = 'https://vimeo.com/0812455'
|
318
318
|
subject { VideoInfo.new(video_url) }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe VideoInfo::Providers::Wistia do
|
4
|
+
describe VideoInfo::Providers::Wistia, :vcr do
|
5
5
|
describe '.usable?' do
|
6
6
|
subject { VideoInfo::Providers::Wistia.usable?(url) }
|
7
7
|
|
@@ -17,7 +17,7 @@ describe VideoInfo::Providers::Wistia do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
describe '#available?' do
|
20
|
-
context 'with valid video'
|
20
|
+
context 'with valid video' do
|
21
21
|
video_url = 'http://fast.wistia.net/embed/iframe/rs1me54mpw'
|
22
22
|
subject { VideoInfo.new(video_url.freeze) }
|
23
23
|
|
@@ -27,7 +27,7 @@ describe VideoInfo::Providers::Wistia do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
context 'with invalid video'
|
30
|
+
context 'with invalid video' do
|
31
31
|
subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/no_video') }
|
32
32
|
|
33
33
|
describe '#available?' do
|
@@ -37,7 +37,7 @@ describe VideoInfo::Providers::Wistia do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
context 'with video rs1me54mpw'
|
40
|
+
context 'with video rs1me54mpw' do
|
41
41
|
subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/rs1me54mpw') }
|
42
42
|
|
43
43
|
describe '#provider' do
|
@@ -130,7 +130,7 @@ describe VideoInfo::Providers::Wistia do
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
-
context 'with video pxonqr42is'
|
133
|
+
context 'with video pxonqr42is' do
|
134
134
|
subject { VideoInfo.new('http://fast.wistia.com/embed/medias/pxonqr42is') }
|
135
135
|
|
136
136
|
describe '#provider' do
|
@@ -167,7 +167,7 @@ describe VideoInfo::Providers::Wistia do
|
|
167
167
|
|
168
168
|
describe '#duration' do
|
169
169
|
subject { super().duration }
|
170
|
-
it { is_expected.to eq 250.
|
170
|
+
it { is_expected.to eq 250.428 }
|
171
171
|
end
|
172
172
|
|
173
173
|
describe '#width' do
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe VideoInfo::Providers::YoutubePlaylist do
|
3
|
+
describe VideoInfo::Providers::YoutubePlaylist, :vcr do
|
4
4
|
before(:each) do
|
5
|
-
api_key =
|
5
|
+
api_key = ENV["YOUTUBE_API_KEY"] || "youtube_api_key_123"
|
6
6
|
VideoInfo.provider_api_keys = { youtube: api_key }
|
7
7
|
end
|
8
8
|
|
@@ -31,7 +31,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
describe '#available?' do
|
34
|
-
context 'with valid playlist'
|
34
|
+
context 'with valid playlist' do
|
35
35
|
playlist_url = 'http://www.youtube.com/playlist?p=PLA575C81A1FBC04CF'
|
36
36
|
subject { VideoInfo.new(playlist_url.freeze) }
|
37
37
|
|
@@ -41,7 +41,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
context 'with invalid playlist'
|
44
|
+
context 'with invalid playlist' do
|
45
45
|
invalid_playlist_url = 'http://www.youtube.com/playlist?' \
|
46
46
|
'p=PLA575C81A1FBC04CF_invalid'
|
47
47
|
subject { VideoInfo.new(invalid_playlist_url) }
|
@@ -52,7 +52,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
context 'with &list= url'
|
55
|
+
context 'with &list= url' do
|
56
56
|
playlist_url = 'http://www.youtube.com/playlist?list=PLA575C81A1FBC04CF'
|
57
57
|
subject { VideoInfo.new(playlist_url) }
|
58
58
|
|
@@ -63,15 +63,10 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
context 'with playlist PL9hW1uS6HUftLdHI6RIsaf'
|
67
|
-
let(:
|
66
|
+
context 'with playlist PL9hW1uS6HUftLdHI6RIsaf' do
|
67
|
+
let(:video_ids) do
|
68
68
|
[
|
69
|
-
|
70
|
-
VideoInfo.new('http://www.youtube.com/watch?v=_Bt3-WsHfB0'),
|
71
|
-
VideoInfo.new('http://www.youtube.com/watch?v=9g2U12SsRns'),
|
72
|
-
VideoInfo.new('http://www.youtube.com/watch?v=8b0aEoxqqC0'),
|
73
|
-
VideoInfo.new('http://www.youtube.com/watch?v=6c3mHikRz0I'),
|
74
|
-
VideoInfo.new('http://www.youtube.com/watch?v=OQVHWsTHcoc')
|
69
|
+
"9g2U12SsRns", "AsqTAkLKb4M", "K681ILSXyUY", "OQVHWsTHcoc", "QtwplSG6VvM", "WK8qRNSmhEU", "XIoGq39abMk", "eKkv1C_O-QI", "lau14lhZpoU", "HvplY9BPKG8", "mTdNi9Mqiu8", "qAVwpBZ1HYA"
|
75
70
|
]
|
76
71
|
end
|
77
72
|
|
@@ -150,45 +145,44 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
150
145
|
|
151
146
|
describe '#thumbnail_small' do
|
152
147
|
subject { super().thumbnail_small }
|
153
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
148
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/default.jpg'
|
154
149
|
it { is_expected.to eq thumbnail_url }
|
155
150
|
end
|
156
151
|
|
157
152
|
describe '#thumbnail_medium' do
|
158
153
|
subject { super().thumbnail_medium }
|
159
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
154
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/mqdefault.jpg'
|
160
155
|
it { is_expected.to eq thumbnail_url }
|
161
156
|
end
|
162
157
|
|
163
158
|
describe '#thumbnail_large' do
|
164
159
|
subject { super().thumbnail_large }
|
165
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
160
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/hqdefault.jpg'
|
166
161
|
it { is_expected.to eq thumbnail_url }
|
167
162
|
end
|
168
163
|
|
169
164
|
describe '#thumbnail_large_2x' do
|
170
165
|
subject { super().thumbnail_large_2x }
|
171
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
166
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/sddefault.jpg'
|
172
167
|
it { is_expected.to eq thumbnail_url }
|
173
168
|
end
|
174
169
|
|
175
170
|
describe '#thumbnail_maxres' do
|
176
171
|
subject { super().thumbnail_maxres }
|
177
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
172
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/maxresdefault.jpg'
|
178
173
|
it { is_expected.to eq thumbnail_url }
|
179
174
|
end
|
180
175
|
|
181
176
|
describe '#thumbnail' do
|
182
177
|
subject { super().thumbnail }
|
183
|
-
thumbnail_url = 'https://i.ytimg.com/vi/
|
178
|
+
thumbnail_url = 'https://i.ytimg.com/vi/9g2U12SsRns/default.jpg'
|
184
179
|
it { is_expected.to eq thumbnail_url }
|
185
180
|
end
|
186
181
|
|
187
182
|
describe '#videos' do
|
188
|
-
subject { super().videos }
|
183
|
+
subject { super().videos.map(&:video_id) }
|
189
184
|
it 'returns list of videos in playlist' do
|
190
|
-
|
191
|
-
is_expected.to match_array(videos)
|
185
|
+
is_expected.to match_array(video_ids)
|
192
186
|
end
|
193
187
|
end
|
194
188
|
|
@@ -199,14 +193,14 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
199
193
|
|
200
194
|
describe '#author' do
|
201
195
|
subject { super().author }
|
202
|
-
it { is_expected.to eq '
|
196
|
+
it { is_expected.to eq 'TeamYouTube [Help]' }
|
203
197
|
end
|
204
198
|
|
205
199
|
describe '#author_thumbnail' do
|
206
200
|
subject { super().author_thumbnail }
|
207
|
-
author_thumbnail = 'https://yt3.ggpht.com
|
208
|
-
'
|
209
|
-
'
|
201
|
+
author_thumbnail = 'https://yt3.ggpht.com/a/' \
|
202
|
+
'AATXAJwyEv0uEyk3JLskjLiUCqSVzsGmpWw2icLfBOBzWg' \
|
203
|
+
'=s88-c-k-c0x00ffffff-no-rj'
|
210
204
|
it { is_expected.to eq author_thumbnail }
|
211
205
|
end
|
212
206
|
|
@@ -217,7 +211,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
217
211
|
end
|
218
212
|
end
|
219
213
|
|
220
|
-
context 'with playlist that does not exist in embed path'
|
214
|
+
context 'with playlist that does not exist in embed path' do
|
221
215
|
playlist_url = 'http://www.youtube.com/embed/videoseries?' \
|
222
216
|
'list=PL0E8117603D70E10A'
|
223
217
|
subject { VideoInfo.new(playlist_url) }
|
@@ -233,7 +227,7 @@ describe VideoInfo::Providers::YoutubePlaylist do
|
|
233
227
|
end
|
234
228
|
end
|
235
229
|
|
236
|
-
context 'with playlist valid playlist in embed path'
|
230
|
+
context 'with playlist valid playlist in embed path' do
|
237
231
|
playlist_url = 'http://www.youtube.com/embed/videoseries' \
|
238
232
|
'?list=PL9hW1uS6HUftLdHI6RIsaf-iXTm09qnEr'
|
239
233
|
subject { VideoInfo.new(playlist_url) }
|
@@ -1,12 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe VideoInfo::Providers::Youtube do
|
4
|
-
|
4
|
+
before { VideoInfo.provider_api_keys = {} }
|
5
|
+
|
6
|
+
context 'with a video without description', :vcr do
|
5
7
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=WVsj2pS-zFY') }
|
6
8
|
|
7
9
|
describe '#description' do
|
8
10
|
subject { super().description }
|
9
|
-
it { is_expected.to eq
|
11
|
+
it { is_expected.to eq " " }
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
[nil,
|
4
|
-
describe VideoInfo::Providers::Youtube do
|
3
|
+
[nil, ENV["YOUTUBE_API_KEY"] || "youtube_api_key_123"].each do |api_key|
|
4
|
+
describe VideoInfo::Providers::Youtube, :vcr do
|
5
5
|
before(:all) do
|
6
6
|
VideoInfo.provider_api_keys = { youtube: api_key }
|
7
7
|
end
|
@@ -31,7 +31,7 @@ require 'spec_helper'
|
|
31
31
|
end
|
32
32
|
|
33
33
|
describe '#available?' do
|
34
|
-
context 'with valid video'
|
34
|
+
context 'with valid video' do
|
35
35
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4'.freeze) }
|
36
36
|
|
37
37
|
describe '#available?' do
|
@@ -40,7 +40,7 @@ require 'spec_helper'
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
context 'with unavailable video'
|
43
|
+
context 'with unavailable video' do
|
44
44
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=SUkXvWn1m7Q') }
|
45
45
|
|
46
46
|
describe '#available?' do
|
@@ -143,7 +143,7 @@ require 'spec_helper'
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
-
context 'with video removed because of copyright claim'
|
146
|
+
context 'with video removed because of copyright claim' do
|
147
147
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=ffClNhwx0KU') }
|
148
148
|
|
149
149
|
describe '#available?' do
|
@@ -153,7 +153,7 @@ require 'spec_helper'
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
|
-
context 'with video mZqGqE0D0n4'
|
156
|
+
context 'with video mZqGqE0D0n4' do
|
157
157
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4') }
|
158
158
|
|
159
159
|
describe '#provider' do
|
@@ -191,9 +191,10 @@ require 'spec_helper'
|
|
191
191
|
|
192
192
|
describe '#author_thumbnail' do
|
193
193
|
subject { super().author_thumbnail }
|
194
|
-
author_thumbnail = 'https://yt3.ggpht.com
|
195
|
-
'
|
196
|
-
'
|
194
|
+
author_thumbnail = 'https://yt3.ggpht.com/a/' \
|
195
|
+
'AATXAJyf5l8p3WQvOx-Q0o8ssGmIL-K5taxKHv5ZEEYc' \
|
196
|
+
'=s88-c-k-c0x00ffffff-no-rj'
|
197
|
+
|
197
198
|
it { is_expected.to eql author_thumbnail }
|
198
199
|
end
|
199
200
|
|
@@ -249,7 +250,7 @@ require 'spec_helper'
|
|
249
250
|
if api_key.nil?
|
250
251
|
is_expected.to eq Time.parse('Sat Apr 12 2008', Time.now.utc)
|
251
252
|
else
|
252
|
-
is_expected.to eq Time.parse('Sat Apr 12 22:
|
253
|
+
is_expected.to eq Time.parse('Sat Apr 12 22:34:48 UTC 2008',
|
253
254
|
Time.now.utc)
|
254
255
|
end
|
255
256
|
end
|
@@ -291,7 +292,7 @@ require 'spec_helper'
|
|
291
292
|
end
|
292
293
|
end
|
293
294
|
|
294
|
-
context 'with video oQ49W_xKzKA'
|
295
|
+
context 'with video oQ49W_xKzKA' do
|
295
296
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=oQ49W_xKzKA') }
|
296
297
|
|
297
298
|
it 'should properly apply arbitrary url attributes' do
|
@@ -300,7 +301,7 @@ require 'spec_helper'
|
|
300
301
|
end
|
301
302
|
end
|
302
303
|
|
303
|
-
context 'with video oQ49W_xKzKA'
|
304
|
+
context 'with video oQ49W_xKzKA' do
|
304
305
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=oQ49W_xKzKA') }
|
305
306
|
|
306
307
|
describe '#provider' do
|
@@ -314,7 +315,7 @@ require 'spec_helper'
|
|
314
315
|
end
|
315
316
|
end
|
316
317
|
|
317
|
-
context 'with video Xp6CXF-Cesg'
|
318
|
+
context 'with video Xp6CXF-Cesg' do
|
318
319
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=Xp6CXF-Cesg') }
|
319
320
|
|
320
321
|
describe '#provider' do
|
@@ -328,7 +329,7 @@ require 'spec_helper'
|
|
328
329
|
end
|
329
330
|
end
|
330
331
|
|
331
|
-
context 'with video VeasFckfMHY in user url'
|
332
|
+
context 'with video VeasFckfMHY in user url' do
|
332
333
|
video_url = 'http://www.youtube.com/user/EducatorVids3?v=VeasFckfMHY'
|
333
334
|
subject { VideoInfo.new(video_url) }
|
334
335
|
|
@@ -348,7 +349,7 @@ require 'spec_helper'
|
|
348
349
|
end
|
349
350
|
end
|
350
351
|
|
351
|
-
context 'with video VeasFckfMHY after params'
|
352
|
+
context 'with video VeasFckfMHY after params' do
|
352
353
|
video_url = 'http://www.youtube.com/watch?feature=player_profilepage&v=VeasFckfMHY'
|
353
354
|
subject { VideoInfo.new(video_url) }
|
354
355
|
|
@@ -368,7 +369,7 @@ require 'spec_helper'
|
|
368
369
|
end
|
369
370
|
end
|
370
371
|
|
371
|
-
context 'with video VeasFckfMHY in path'
|
372
|
+
context 'with video VeasFckfMHY in path' do
|
372
373
|
subject { VideoInfo.new('http://www.youtube.com/v/VeasFckfMHY') }
|
373
374
|
|
374
375
|
describe '#provider' do
|
@@ -382,7 +383,7 @@ require 'spec_helper'
|
|
382
383
|
end
|
383
384
|
end
|
384
385
|
|
385
|
-
context 'with video VeasFckfMHY in e path'
|
386
|
+
context 'with video VeasFckfMHY in e path' do
|
386
387
|
subject { VideoInfo.new('http://www.youtube.com/e/VeasFckfMHY') }
|
387
388
|
|
388
389
|
describe '#provider' do
|
@@ -396,7 +397,7 @@ require 'spec_helper'
|
|
396
397
|
end
|
397
398
|
end
|
398
399
|
|
399
|
-
context 'with video VeasFckfMHY in embed path'
|
400
|
+
context 'with video VeasFckfMHY in embed path' do
|
400
401
|
subject { VideoInfo.new('http://www.youtube.com/embed/VeasFckfMHY') }
|
401
402
|
|
402
403
|
describe '#provider' do
|
@@ -410,7 +411,7 @@ require 'spec_helper'
|
|
410
411
|
end
|
411
412
|
end
|
412
413
|
|
413
|
-
context 'with video JM9NgvjjVng in youtu.be url'
|
414
|
+
context 'with video JM9NgvjjVng in youtu.be url' do
|
414
415
|
subject { VideoInfo.new('http://youtu.be/JM9NgvjjVng') }
|
415
416
|
|
416
417
|
describe '#provider' do
|
@@ -424,7 +425,7 @@ require 'spec_helper'
|
|
424
425
|
end
|
425
426
|
end
|
426
427
|
|
427
|
-
context 'without http or www'
|
428
|
+
context 'without http or www' do
|
428
429
|
subject { VideoInfo.new('youtu.be/JM9NgvjjVng') }
|
429
430
|
|
430
431
|
describe '#provider' do
|
@@ -438,7 +439,7 @@ require 'spec_helper'
|
|
438
439
|
end
|
439
440
|
end
|
440
441
|
|
441
|
-
context 'with video url in text'
|
442
|
+
context 'with video url in text' do
|
442
443
|
url_in_text = '<a href="http://www.youtube.com/watch?v=mZqGqE0D0n4">' \
|
443
444
|
'http://www.youtube.com/watch?v=mZqGqE0D0n4</a>'
|
444
445
|
subject { VideoInfo.new(url_in_text) }
|
@@ -454,7 +455,7 @@ require 'spec_helper'
|
|
454
455
|
end
|
455
456
|
end
|
456
457
|
|
457
|
-
context 'with iframe attributes'
|
458
|
+
context 'with iframe attributes' do
|
458
459
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4') }
|
459
460
|
|
460
461
|
describe '#provider' do
|
@@ -470,7 +471,7 @@ require 'spec_helper'
|
|
470
471
|
end
|
471
472
|
end
|
472
473
|
|
473
|
-
context 'with arbitrary iframe_attributes'
|
474
|
+
context 'with arbitrary iframe_attributes' do
|
474
475
|
subject { VideoInfo.new('http://www.youtube.com/watch?v=mZqGqE0D0n4') }
|
475
476
|
|
476
477
|
describe '#provider' do
|
@@ -485,7 +486,7 @@ require 'spec_helper'
|
|
485
486
|
end
|
486
487
|
end
|
487
488
|
|
488
|
-
context 'with full screen video URLs'
|
489
|
+
context 'with full screen video URLs' do
|
489
490
|
subject { VideoInfo.new('http://www.youtube.com/v/mZqGqE0D0n4') }
|
490
491
|
|
491
492
|
describe '#provider' do
|
@@ -558,7 +559,7 @@ require 'spec_helper'
|
|
558
559
|
if api_key.nil?
|
559
560
|
is_expected.to eq Time.parse('Sat Apr 12 2008', Time.now.utc)
|
560
561
|
else
|
561
|
-
is_expected.to eq Time.parse('Sat Apr 12 22:
|
562
|
+
is_expected.to eq Time.parse('Sat Apr 12 22:34:48 UTC 2008',
|
562
563
|
Time.now.utc)
|
563
564
|
end
|
564
565
|
end
|
@@ -590,7 +591,8 @@ require 'spec_helper'
|
|
590
591
|
|
591
592
|
describe '#view_count' do
|
592
593
|
subject { super().view_count }
|
593
|
-
|
594
|
+
|
595
|
+
it { is_expected.to eq 7962 }
|
594
596
|
end
|
595
597
|
end
|
596
598
|
end
|