🔧 Moved scraping utils out of this service

This commit is contained in:
2022-02-16 20:25:48 -08:00
parent 2909d6686b
commit fdc1acd1ad
3 changed files with 4 additions and 18 deletions

View File

@@ -1,8 +0,0 @@
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
export const scrapeIssuesFromDOM = (html: string) => {
const dom = new JSDOM(html);
return dom.window.document.querySelector("p").textContent;
}

View File

@@ -100,13 +100,13 @@ export const extractCoverFromFile2 = async (
targetDirectory+
"/" +
fileNameWithoutExtension +
"_200px.jpg";
"_275px.jpg";
// 5. resize image
await resizeImage(
targetCoverImageFilePath,
path.resolve(renditionPath),
200
275
);
return {
name: fileNameWithoutExtension,