mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
chore: Remove Unnecessary comments
This commit is contained in:
parent
fdc8d61fec
commit
ddd10909ad
@ -98,9 +98,6 @@ const generateEmail = async (domainName:string, keywords:KeywordType[]) : Promis
|
||||
.replace('{{stat}}', stat)
|
||||
.replace('{{preheader}}', stat);
|
||||
|
||||
// const writePath = path.join(__dirname, '..', 'email', 'email_update.html');
|
||||
// await writeFile(writePath, updatedEmail, {encoding:'utf-8'});
|
||||
|
||||
return updatedEmail;
|
||||
};
|
||||
|
||||
|
@ -26,7 +26,6 @@ const refreshKeywords = async (keywords:KeywordType[], settings:SettingsType): P
|
||||
|
||||
const end = performance.now();
|
||||
console.log(`time taken: ${end - start}ms`);
|
||||
// console.log('refreshedResults: ', refreshedResults);
|
||||
return refreshedResults;
|
||||
};
|
||||
|
||||
|
@ -112,7 +112,6 @@ export const scrapeKeywordFromGoogle = async (keyword:KeywordType, settings:Sett
|
||||
}
|
||||
} catch (error:any) {
|
||||
console.log('#### SCRAPE ERROR: ', keyword.keyword, error?.code, error?.response?.status, error?.response?.data, error);
|
||||
// If Failed, Send back the original Keyword
|
||||
}
|
||||
|
||||
return refreshedResults;
|
||||
@ -148,7 +147,6 @@ export const extractScrapedResult = (content:string, scraper_type:string): Searc
|
||||
const url = $(searchResult[i]).find('a').attr('href');
|
||||
if (title && url) {
|
||||
extractedResult.push({ title, url, position: i });
|
||||
// console.log(i, ' ',title, ' ', url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,7 +180,6 @@ export const retryScrape = async (keywordID: number) : Promise<void> => {
|
||||
if (!keywordID) { return; }
|
||||
let currentQueue: number[] = [];
|
||||
|
||||
// const filePath = path.join(__dirname, '..', '..', '..', '..', 'data', 'failed_queue.json');
|
||||
const filePath = `${process.cwd()}/data/failed_queue.json`;
|
||||
const currentQueueRaw = await readFile(filePath, { encoding: 'utf-8' }).catch((err) => { console.log(err); return '[]'; });
|
||||
currentQueue = JSON.parse(currentQueueRaw);
|
||||
@ -203,7 +200,6 @@ export const removeFromRetryQueue = async (keywordID: number) : Promise<void> =>
|
||||
if (!keywordID) { return; }
|
||||
let currentQueue: number[] = [];
|
||||
|
||||
// const filePath = path.join(__dirname, '..', '..', '..', '..', 'data', 'failed_queue.json');
|
||||
const filePath = `${process.cwd()}/data/failed_queue.json`;
|
||||
const currentQueueRaw = await readFile(filePath, { encoding: 'utf-8' }).catch((err) => { console.log(err); return '[]'; });
|
||||
currentQueue = JSON.parse(currentQueueRaw);
|
||||
|
Loading…
Reference in New Issue
Block a user