autogram
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -72,3 +72,2 @@ const fs = require('fs').promises; | ||
let done = false; | ||
let error; | ||
do { | ||
@@ -80,3 +79,2 @@ try { | ||
} catch (err) { | ||
error = err; | ||
await page.click('body > div > button'); // Image close button | ||
@@ -86,4 +84,3 @@ await wait(1000); | ||
} while (retries < 3 && !done); | ||
if (done) return; | ||
if (error) throw error; | ||
return done; | ||
}; | ||
@@ -96,3 +93,4 @@ | ||
for (const image of images) { | ||
await handleImageClick(page, image); | ||
const didHandle = await handleImageClick(page, image); | ||
if (!didHandle) continue; | ||
const followButton = await page.$('body > div > div > div > article > header > div > div > div > button'); | ||
@@ -99,0 +97,0 @@ const followButtonText = await page.$eval('body > div > div > div > article > header > div > div > div > button', btn => btn.textContent); |
{ | ||
"name": "autogram", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
{ | ||
"createdAt": 1575985394561, | ||
"currentTag": "#zingabeach", | ||
"totalFollowed": 52, | ||
"createdAt": 1575988200973, | ||
"currentTag": "#nortedailha", | ||
"totalFollowed": 61, | ||
"followed": { | ||
@@ -17,3 +17,9 @@ "#nortedailha": [ | ||
"rg_40revestimentos", | ||
"restaurantemartes" | ||
"restaurantemartes", | ||
"laparrillad", | ||
"consagradas.store", | ||
"clinica_lariessa_moreira", | ||
"confiancerestaurante", | ||
"casacafebistro", | ||
"cozinha_rebelde" | ||
], | ||
@@ -34,3 +40,5 @@ "#praiadosingleses": [ | ||
"janine_pedrollo", | ||
"bacofloripa" | ||
"bacofloripa", | ||
"barber_n_beer", | ||
"sevencalcadosejeans" | ||
], | ||
@@ -57,3 +65,4 @@ "#praiadosantinho": [ | ||
"calangotattoofloripa", | ||
"alineabutique" | ||
"alineabutique", | ||
"diariodeumlar_marcia" | ||
], | ||
@@ -73,8 +82,4 @@ "#zingabeach": [ | ||
"imageIndex": { | ||
"#nortedailha": 48, | ||
"#praiadosingleses": 48, | ||
"#zingabeach": 48, | ||
"#praiadosantinho": 24, | ||
"#nortedailhadamagia": 24 | ||
"#nortedailha": 24 | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
14381
274