mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Force to use content handler of piped.video when saving from extensions
This commit is contained in:
parent
bfbd80e8f1
commit
eb58bf11ba
3 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ export class PipedVideoHandler extends ContentHandler {
|
|||
return {}
|
||||
}
|
||||
const videoStream = videoStreams[0]
|
||||
const src = `${baseUrl}/embed/${videoId}`
|
||||
const src = `https://piped.mha.fi/embed/${videoId}`
|
||||
// escape html entities in title
|
||||
const title = metadata.title
|
||||
const escapedTitle = this.escapeTitle(title)
|
||||
|
|
@ -67,7 +67,7 @@ export class PipedVideoHandler extends ContentHandler {
|
|||
<meta property="og:title" content="${escapedTitle}" />
|
||||
<meta property="og:description" content="${metadata.description}" />
|
||||
<meta property="og:article:author" content="${authorName}" />
|
||||
<meta property="og:site_name" content="Piped" />
|
||||
<meta property="og:site_name" content="Piped Video" />
|
||||
<meta property="article:published_time" content="${metadata.uploadDate}" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ Readability.prototype = {
|
|||
publishedDate: /published|modified|created|updated/i,
|
||||
replaceFonts: /<(\/?)font[^>]*>/gi,
|
||||
normalize: /\s{2,}/g,
|
||||
videos: /\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq|cdnapisec\.kaltura)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv|api-piped\.mha\.fi)/i,
|
||||
videos: /\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq|cdnapisec\.kaltura)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv|piped\.mha\.fi)/i,
|
||||
shareElements: /(\b|_)(share|sharedaddy|post-tags)(\b|_)/i,
|
||||
nextLink: /(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,
|
||||
prevLink: /(prev|earl|old|new|<|«)/i,
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ function handleBackendUrl(url) {
|
|||
const FORCE_CONTENT_FETCH_URLS = [
|
||||
// twitter status url regex
|
||||
/twitter\.com\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+)(?:\/.*)?/,
|
||||
/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,
|
||||
/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu\.be|piped\.video))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,
|
||||
]
|
||||
return FORCE_CONTENT_FETCH_URLS.some((regex) => regex.test(url))
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue