instauto 9.1.7 → 9.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +12 -12
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -315,23 +315,23 @@ const Instauto = async (db, browser, options) => {
|
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
async function findUnfollowButton() {
|
|
318
|
-
|
|
319
|
-
if (
|
|
318
|
+
let button = await findButtonWithText('Following');
|
|
319
|
+
if (button) return button;
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
if (
|
|
321
|
+
button = await findButtonWithText('Requested');
|
|
322
|
+
if (button) return button;
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
if (
|
|
324
|
+
let elementHandles = await page.$x("//header//button[*//span[@aria-label='Following']]");
|
|
325
|
+
if (elementHandles.length > 0) return elementHandles[0];
|
|
326
326
|
|
|
327
|
-
|
|
328
|
-
if (
|
|
327
|
+
elementHandles = await page.$x("//header//button[*//span[@aria-label='Requested']]");
|
|
328
|
+
if (elementHandles.length > 0) return elementHandles[0];
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
if (
|
|
330
|
+
elementHandles = await page.$x("//header//button[*//*[name()='svg'][@aria-label='Following']]");
|
|
331
|
+
if (elementHandles.length > 0) return elementHandles[0];
|
|
332
332
|
|
|
333
|
-
|
|
334
|
-
if (
|
|
333
|
+
elementHandles = await page.$x("//header//button[*//*[name()='svg'][@aria-label='Requested']]");
|
|
334
|
+
if (elementHandles.length > 0) return elementHandles[0];
|
|
335
335
|
|
|
336
336
|
return undefined;
|
|
337
337
|
}
|