rkwyu commited on
Commit ·
3a25a20
1
Parent(s): 91f92f7
fix typo
Browse files- run.js +1 -1
- src/App.js +1 -1
- src/service/ScribdDownloader.js +1 -1
- src/service/SlideshareDownloader.js +1 -1
run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import { app } from './src/App.js'
|
| 2 |
-
import * as scribdFlag from './src/const/
|
| 3 |
|
| 4 |
const flags = [scribdFlag.DEFAULT, scribdFlag.IMAGE]
|
| 5 |
|
|
|
|
| 1 |
import { app } from './src/App.js'
|
| 2 |
+
import * as scribdFlag from './src/const/ScribdFlag.js'
|
| 3 |
|
| 4 |
const flags = [scribdFlag.DEFAULT, scribdFlag.IMAGE]
|
| 5 |
|
src/App.js
CHANGED
|
@@ -15,7 +15,7 @@ class App {
|
|
| 15 |
if (url.match(scribdRegex.DOMAIN)) {
|
| 16 |
await scribdDownloader.execute(url, flag)
|
| 17 |
} else if (url.match(slideshareRegex.DOMAIN)) {
|
| 18 |
-
await slideshareDownloader.execute(url
|
| 19 |
} else {
|
| 20 |
throw new Error(`Unsupported URL: ${url}`)
|
| 21 |
}
|
|
|
|
| 15 |
if (url.match(scribdRegex.DOMAIN)) {
|
| 16 |
await scribdDownloader.execute(url, flag)
|
| 17 |
} else if (url.match(slideshareRegex.DOMAIN)) {
|
| 18 |
+
await slideshareDownloader.execute(url)
|
| 19 |
} else {
|
| 20 |
throw new Error(`Unsupported URL: ${url}`)
|
| 21 |
}
|
src/service/ScribdDownloader.js
CHANGED
|
@@ -4,7 +4,7 @@ import { pdfGenerator } from "../utils/io/PdfGenerator.js";
|
|
| 4 |
import { configLoader } from "../utils/io/ConfigLoader.js";
|
| 5 |
import { directoryIo } from "../utils/io/DirectoryIo.js"
|
| 6 |
import * as scribdRegex from "../const/ScribdRegex.js"
|
| 7 |
-
import * as scribdFlag from '../const/
|
| 8 |
import { Image } from "../object/Image.js"
|
| 9 |
import sharp from "sharp";
|
| 10 |
import path from 'path'
|
|
|
|
| 4 |
import { configLoader } from "../utils/io/ConfigLoader.js";
|
| 5 |
import { directoryIo } from "../utils/io/DirectoryIo.js"
|
| 6 |
import * as scribdRegex from "../const/ScribdRegex.js"
|
| 7 |
+
import * as scribdFlag from '../const/ScribdFlag.js'
|
| 8 |
import { Image } from "../object/Image.js"
|
| 9 |
import sharp from "sharp";
|
| 10 |
import path from 'path'
|
src/service/SlideshareDownloader.js
CHANGED
|
@@ -35,7 +35,7 @@ class SlideshareDownloader {
|
|
| 35 |
let dir = `${output}/${id}`
|
| 36 |
await directoryIo.create(dir)
|
| 37 |
|
| 38 |
-
// navigate to
|
| 39 |
let page = await puppeteerSg.getPage(url)
|
| 40 |
|
| 41 |
// wait rendering
|
|
|
|
| 35 |
let dir = `${output}/${id}`
|
| 36 |
await directoryIo.create(dir)
|
| 37 |
|
| 38 |
+
// navigate to slideshare
|
| 39 |
let page = await puppeteerSg.getPage(url)
|
| 40 |
|
| 41 |
// wait rendering
|