mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-25 02:52:11 +02:00

- added support for vine archives - fixed ability to download muted videos from tumblr - removed extra instagram id testing which i left by mistake
9 lines
435 B
JavaScript
9 lines
435 B
JavaScript
export default async function(obj) {
|
|
let post = await fetch(`https://archive.vine.co/posts/${obj.id}.json`).then((r) => { return r.json() }).catch(() => { return false });
|
|
if (!post) return { error: 'ErrorEmptyDownload' };
|
|
|
|
if (post.videoUrl) return { urls: post.videoUrl.replace("http://", "https://"), filename: `vine_${obj.id}.mp4`, audioFilename: `vine_${obj.id}_audio` };
|
|
|
|
return { error: 'ErrorEmptyDownload' }
|
|
}
|