From 40e6fd9ab5f1683cb37201e225d86568f417da77 Mon Sep 17 00:00:00 2001 From: hovanhoa Date: Tue, 21 May 2024 15:46:37 +0700 Subject: [PATCH] feat: correct xpath for count --- scraper/tweet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scraper/tweet.py b/scraper/tweet.py index d9f5c24..dfd8b2f 100644 --- a/scraper/tweet.py +++ b/scraper/tweet.py @@ -70,7 +70,7 @@ class Tweet: try: self.reply_cnt = card.find_element( - "xpath", './/div[@data-testid="reply"]//span' + "xpath", './/button[@data-testid="reply"]//span' ).text if self.reply_cnt == "": @@ -80,7 +80,7 @@ class Tweet: try: self.retweet_cnt = card.find_element( - "xpath", './/div[@data-testid="retweet"]//span' + "xpath", './/button[@data-testid="retweet"]//span' ).text if self.retweet_cnt == "": @@ -90,7 +90,7 @@ class Tweet: try: self.like_cnt = card.find_element( - "xpath", './/div[@data-testid="like"]//span' + "xpath", './/button[@data-testid="like"]//span' ).text if self.like_cnt == "":