Skip to content

Commit d2e16c3

Browse files
committed
Use src poster value as image
1 parent 09efd46 commit d2e16c3

File tree

5 files changed

+607
-23
lines changed

5 files changed

+607
-23
lines changed
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
exports['video src 1'] = {
2+
"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",
23
"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",
34
"author": "Rachel Becker",
45
"date": "2018-01-22T23:38:17.000Z",
56
"description": "The zombies are only released on the weekends, the developers promise",
6-
"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",
77
"lang": null,
88
"logo": "https://cdn.vox-cdn.com/uploads/chorus_asset/file/7395351/android-chrome-192x192.0.png",
99
"publisher": "The Verge",
@@ -12,11 +12,11 @@ exports['video src 1'] = {
1212
}
1313

1414
exports['source src 1'] = {
15+
"image": "https://img-9gag-fun.9cache.com/photo/aGjVLDK_460s.jpg",
1516
"video": "https://img-9gag-fun.9cache.com/photo/aGjVLDK_460sv.mp4",
1617
"author": null,
1718
"date": null,
1819
"description": "Watch the video and the fun convo of the 9GAG community",
19-
"image": "https://images-cdn.9gag.com/photo/aGjVLDK_700b.jpg",
2020
"lang": "en",
2121
"logo": "https://assets-9gag-fun.9cache.com/s/fab0aa49/174d0b1ec891e220e79a7cb3af66a1fbb1eed154/static/dist/core/img/favicon.ico",
2222
"publisher": "9GAG",
@@ -25,15 +25,28 @@ exports['source src 1'] = {
2525
}
2626

2727
exports['og:video 1'] = {
28+
"image": "https://pbs.twimg.com/tweet_video_thumb/DUQODu8VMAASlkj.jpg",
2829
"video": "https://twitter.com/i/videos/955905369242513414?embed_source=facebook",
2930
"author": "_developit",
3031
"date": "2018-02-18T12:00:00.000Z",
3132
"description": "“📣 Announcing... Karmatic!\n🦑 Easy automatic (headless) browser testing\n🛠 No config needed, auto-detects webpack settings\n🤹‍♀️ Only one dependency to juggle\n🏎 Powered by Karma, Webpack, Jasmine & Puppeteer\nhttps://t.co/nguAcGaWQP https://t.co/OgxikFBdQ8”",
32-
"image": "https://pbs.twimg.com/tweet_video_thumb/DUQODu8VMAASlkj.jpg",
3333
"lang": "es",
3434
"logo": "https://abs.twimg.com/icons/apple-touch-icon-192x192.png",
3535
"publisher": "Twitter",
3636
"title": "Jason Miller 🦊⚛ on Twitter",
3737
"url": "https://twitter.com/_developit/status/955905369242513414"
3838
}
3939

40+
exports['src:poster 1'] = {
41+
"image": "https://thumbs.gfycat.com/TimelyHealthyArmadillo-mobile.jpg",
42+
"video": "https://thumbs.gfycat.com/TimelyHealthyArmadillo-mobile.mp4",
43+
"author": "Gfycat",
44+
"date": null,
45+
"description": "Watch Backflip GIF on Gfycat. Discover more PUBG GIFs on Gfycat",
46+
"lang": "en",
47+
"logo": "https://gfycat.com/static/apple-touch-icon/apple-touch-icon-180x180.png",
48+
"publisher": "Gfycat",
49+
"title": "Backflip - Create, Discover and Share Awesome GIFs on Gfycat",
50+
"url": "https://gfycat.com/gifs/detail/timelyhealthyarmadillo"
51+
}
52+

packages/metascraper-video/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const wrap = rule => ({ htmlDom, url }) => {
1919
*/
2020

2121
module.exports = () => ({
22+
image: [
23+
wrap($ => $('video').attr('poster'))
24+
],
2225
video: [
2326
wrap($ => $('meta[property="og:video:secure_url"]').attr('content')),
2427
wrap($ => $('meta[property="og:video:url"]').attr('content')),

0 commit comments

Comments
 (0)