Browse Source

fix bug with tweets with a blockquote

Mike L 3 years ago
parent
commit
e97b2dac79
3 changed files with 2 additions and 2 deletions
  1. 1 1
      dist/webshot.js
  2. 0 0
      dist/webshot.js.map
  3. 1 1
      src/webshot.ts

+ 1 - 1
dist/webshot.js

@@ -96,7 +96,7 @@ class Webshot extends CallableInstance {
                             });
                         }, 250);
                     }))
-                        .then(() => page.waitForSelector('xpath=//section/*/*/div[.//article[not(.//time)]]', { timeout: getTimeout() }))
+                        .then(() => page.waitForSelector('xpath=//section/*/*/div[.//article[not(.//*[@data-testid]//time)]]', { timeout: getTimeout() }))
                         .then(handle => handle.$$('xpath=..//a[contains(@href,"content_you_see")]/../../..//*[@role="button"]')
                         .then(sensitiveToggles => {
                         const count = sensitiveToggles.length;

File diff suppressed because it is too large
+ 0 - 0
dist/webshot.js.map


+ 1 - 1
src/webshot.ts

@@ -124,7 +124,7 @@ class Webshot extends CallableInstance<[Tweets, (...args) => void, number], Prom
               }, 250);
             }))
             // find main tweet
-            .then(() => page.waitForSelector('xpath=//section/*/*/div[.//article[not(.//time)]]', {timeout: getTimeout()}))
+            .then(() => page.waitForSelector('xpath=//section/*/*/div[.//article[not(.//*[@data-testid]//time)]]', {timeout: getTimeout()}))
             // toggle visibility of sensitive tweets
             .then(handle => handle.$$('xpath=..//a[contains(@href,"content_you_see")]/../../..//*[@role="button"]')
               .then(sensitiveToggles => {

Some files were not shown because too many files changed in this diff