From 8e71c27b52af9b30d8eec5712b4c7a95be954a52 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 28 Dec 2018 19:43:29 +0100 Subject: [PATCH] fallback to link type where possible --- src/scraper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scraper.js b/src/scraper.js index 9399cad6c..7b1a6ad60 100644 --- a/src/scraper.js +++ b/src/scraper.js @@ -140,7 +140,7 @@ const scraper = { } if (data) { let output = { - type: data.type, + type: data.type || 'link', embed: data.html, author: data.author_name, date: data.upload_date ? new Date(data.upload_date).toISOString() : null @@ -163,6 +163,7 @@ const scraper = { const metadata = await metascraper({ html, url }) metadata.sources = ['resource'] + metadata.type = 'link' return metadata }