|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|
|
|
const sources = await Promise.all(images.map(async carouselItem => {
|
|
|
|
const sources = await Promise.all(images.map(async carouselItem => {
|
|
|
|
const src = await page.evaluate(el => el.getAttribute('src'), carouselItem);
|
|
|
|
const src = await page.evaluate(el => el.getAttribute('src'), carouselItem);
|
|
|
|
|
|
|
|
|
|
|
|
if(src.startsWith('data:image')) {
|
|
|
|
if(src.includes('base64')) {
|
|
|
|
//base 64 pasted image
|
|
|
|
//base 64 pasted image
|
|
|
|
console.log('Found base64 image.')
|
|
|
|
console.log('Found base64 image.')
|
|
|
|
return {base64: src};
|
|
|
|
return {base64: src};
|
|
|
|
|