Download plugins/sc.js from HerzaJ/DashX-API: direct link, hf CLI and curl.
- Browser
- Download file 797 Bytes
-
https://huggingface.co/spaces/HerzaJ/DashX-API/resolve/main/plugins/sc.js
- Command line
-
hf download hf://spaces/HerzaJ/DashX-API/plugins/sc.js
-
curl -L -o sc.js https://huggingface.co/spaces/HerzaJ/DashX-API/resolve/main/plugins/sc.js
797 Bytes
| const { soundcloud } = require('notmebotz-tools'); | |
| const handler = async (req, res) => { | |
| try { | |
| const { url } = req.query; | |
| if (!url) { | |
| return res.status(400).json({ | |
| success: false, | |
| error: 'Missing required parameter: url' | |
| }); | |
| } | |
| const result = await soundcloud(url); | |
| res.json({ | |
| author: "Herza", | |
| success: true, | |
| data: result.data | |
| }); | |
| } catch (error) { | |
| res.status(500).json({ | |
| success: false, | |
| error: error.message | |
| }); | |
| } | |
| }; | |
| module.exports = { | |
| name: 'SoundCloud DL', | |
| description: 'Download Soundcloud Music from our server', | |
| type: 'GET', | |
| routes: ['api/download/soundcloud'], | |
| tags: ['downloader', 'tools', 'misc'], | |
| parameters: ['url', 'key'], | |
| enabled: true, | |
| main: ['Downloader'], | |
| handler | |
| } |