Download src/App.js from Brister/skribd: direct link, hf CLI and curl.
- Browser
- Download file 975 Bytes
-
https://huggingface.co/spaces/Brister/skribd/resolve/main/src/App.js
- Command line
-
hf download hf://spaces/Brister/skribd/src/App.js
-
curl -L -o App.js https://huggingface.co/spaces/Brister/skribd/resolve/main/src/App.js
975 Bytes
| import { scribdDownloader } from "./service/ScribdDownloader.js" | |
| import { slideshareDownloader } from "./service/SlideshareDownloader.js" | |
| import { everandDownloader } from "./service/EverandDownloader.js" | |
| import * as scribdRegex from "./const/ScribdRegex.js" | |
| import * as slideshareRegex from "./const/SlideshareRegex.js" | |
| import * as everandRegex from "./const/EverandRegex.js" | |
| class App { | |
| constructor() { | |
| if (!App.instance) { | |
| App.instance = this | |
| } | |
| return App.instance | |
| } | |
| async execute(url, flag) { | |
| if (url.match(scribdRegex.DOMAIN)) { | |
| await scribdDownloader.execute(url, flag) | |
| } else if (url.match(slideshareRegex.DOMAIN)) { | |
| await slideshareDownloader.execute(url) | |
| } else if (url.match(everandRegex.DOMAIN)) { | |
| await everandDownloader.execute(url) | |
| } else { | |
| throw new Error(`Unsupported URL: ${url}`) | |
| } | |
| } | |
| } | |
| export const app = new App() |