- Estrazione dei dati da Amazon
- Ciclo di Estrapolazione di tutti i prodotti ed aggiornamento dei campi scraped e scraped_updated - Creazione file CSV con i campi modificati.
This commit is contained in:
@@ -139,7 +139,7 @@ function updateProductInfoCatProds(productInfo, reccatprod) {
|
||||
async function compressPdf(inputFile, outputFile, compressione) {
|
||||
try {
|
||||
const tempFolder = path.join(cwd, 'temp');
|
||||
const hasTempFolder = tools.isFileExists(tempFolder);
|
||||
const hasTempFolder = await tools.isFileExistsAsync(tempFolder);
|
||||
|
||||
if (!hasTempFolder) {
|
||||
console.log('creo directory', tempFolder);
|
||||
@@ -176,7 +176,7 @@ async function compressPdf(inputFile, outputFile, compressione) {
|
||||
|
||||
async function convertPDF_GS(inputFile, outputFile, width, height) {
|
||||
// Verifica che il file di input esista
|
||||
if (!tools.isFileExists(inputFile)) {
|
||||
if (!await tools.isFileExistsAsync(inputFile)) {
|
||||
throw new Error(`Il file di input non esiste: ${inputFile}`);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ async function convertPDF_GS(inputFile, outputFile, width, height) {
|
||||
console.log('Conversione completata con successo!');
|
||||
|
||||
// Verifica che il file di output sia stato generato
|
||||
if (tools.isFileExists(outputFile)) {
|
||||
if (await tools.isFileExistsAsync(outputFile)) {
|
||||
console.log('File di output generato:', outputFile);
|
||||
} else {
|
||||
console.error('Il File di output NON è stato generato! :', outputFile);
|
||||
@@ -256,7 +256,7 @@ async function extractPdfInfo(inputFile) {
|
||||
}
|
||||
|
||||
async function convertPDF_PdfLib(idapp, inputFile, outputFile, options) {
|
||||
if (!tools.isFileExists(inputFile)) {
|
||||
if (!await tools.isFileExistsAsync(inputFile)) {
|
||||
throw new Error(`Il file di input non esiste: ${inputFile}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user