Skip to content

Commit

Permalink
video is string
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 1, 2018
1 parent 82c6108 commit 1e3227b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
20 changes: 5 additions & 15 deletions packages/metascraper-video/__snapshots__/index.js.snap-shot
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
exports['<source src /> 1'] = {
"image": "https://img-9gag-fun.9cache.com/photo/aGjVLDK_460s.jpg",
"video": [
"https://img-9gag-fun.9cache.com/photo/aGjVLDK_460sv.mp4"
],
"video": "https://img-9gag-fun.9cache.com/photo/aGjVLDK_460sv.mp4",
"author": null,
"date": null,
"description": "Watch the video and the fun convo of the 9GAG community",
Expand All @@ -28,9 +26,7 @@ exports['og:video 1'] = {

exports['single src 1'] = {
"image": "https://cdn.vox-cdn.com/thumbor/AtQQMyWrexi6-Xyk73jv6nqTO7s=/0x5:1247x658/fit-in/1200x630/cdn.vox-cdn.com/uploads/chorus_asset/file/10079811/Screen_Shot_2018_01_22_at_3.27.50_PM.png",
"video": [
"https://cdn.vox-cdn.com/thumbor/4l0C-7uGFtTfc6lWibo1ITiE2YU=/0x0:1280x720/320x213/filters:focal(538x258:742x462):gifv():no_upscale()/cdn.vox-cdn.com/uploads/chorus_image/image/58416873/2018_01_22_14_19_55.0.gif"
],
"video": "https://cdn.vox-cdn.com/thumbor/4l0C-7uGFtTfc6lWibo1ITiE2YU=/0x0:1280x720/320x213/filters:focal(538x258:742x462):gifv():no_upscale()/cdn.vox-cdn.com/uploads/chorus_image/image/58416873/2018_01_22_14_19_55.0.gif",
"author": "Rachel Becker",
"date": "2018-01-22T23:38:17.000Z",
"description": "The zombies are only released on the weekends, the developers promise",
Expand All @@ -43,9 +39,7 @@ exports['single src 1'] = {

exports['clips.twitch.tv 1'] = {
"image": "https://clips-media-assets.twitch.tv/27434665136-offset-2366-preview.jpg",
"video": [
"https://clips-media-assets.twitch.tv/AT-27434665136-offset-2366-1280x720.mp4"
],
"video": "https://clips-media-assets.twitch.tv/AT-27434665136-offset-2366-1280x720.mp4",
"author": null,
"date": null,
"description": "Shroud with the casual coffee sip to kill combo - Clipped by jpan11",
Expand All @@ -58,9 +52,7 @@ exports['clips.twitch.tv 1'] = {

exports['play.tv 1'] = {
"image": "https://d1playscdntv-a.akamaihd.net/video/Ha35bprkDYG/processed/720.jpg",
"video": [
"https://d1playscdntv-a.akamaihd.net/video/Ha35bprkDYG/processed/480.mp4"
],
"video": "https://d1playscdntv-a.akamaihd.net/video/Ha35bprkDYG/processed/480.mp4",
"author": "chineseouchie",
"description": "Publicado por chineseouchie",
"lang": "en",
Expand All @@ -72,9 +64,7 @@ exports['play.tv 1'] = {

exports['src:poster 1'] = {
"image": "https://thumbs.gfycat.com/TimelyHealthyArmadillo-mobile.jpg",
"video": [
"https://thumbs.gfycat.com/TimelyHealthyArmadillo-mobile.mp4"
],
"video": "https://thumbs.gfycat.com/TimelyHealthyArmadillo-mobile.mp4",
"author": "Gfycat",
"date": null,
"description": "Watch Backflip GIF on Gfycat. Discover more PUBG GIFs on Gfycat",
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const wrap = createWrapper((value, url) => urlFn(value, { url }))

const wrapVideo = createWrapper((value, url) => {
const urlValue = urlFn(value, { url })
return isVideoUrl(urlValue) && [urlValue]
return isVideoUrl(urlValue) && urlValue
})

/**
Expand Down

0 comments on commit 1e3227b

Please sign in to comment.