Spaces:
Sleeping
Sleeping
Download api/src/processing/services/vine.js from shuaizhenpin/videoapi: direct link, hf CLI and curl.
- Browser
- Download file 464 Bytes
-
https://huggingface.co/spaces/shuaizhenpin/videoapi/resolve/main/api/src/processing/services/vine.js
- Command line
-
hf download hf://spaces/shuaizhenpin/videoapi/api/src/processing/services/vine.js
-
curl -L -o vine.js https://huggingface.co/spaces/shuaizhenpin/videoapi/resolve/main/api/src/processing/services/vine.js
464 Bytes
| export default async function(obj) { | |
| let post = await fetch(`https://archive.vine.co/posts/${obj.id}.json`) | |
| .then(r => r.json()) | |
| .catch(() => {}); | |
| if (!post) return { error: "fetch.empty" }; | |
| if (post.videoUrl) return { | |
| urls: post.videoUrl.replace("http://", "https://"), | |
| filename: `vine_${obj.id}.mp4`, | |
| audioFilename: `vine_${obj.id}_audio` | |
| } | |
| return { error: "fetch.empty" } | |
| } | |