mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-17 18:31:20 +00:00
fallback to link type where possible
This commit is contained in:
parent
f8f0ff3d06
commit
8e71c27b52
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user