feat: correct xpath for count

This commit is contained in:
hovanhoa
2024-05-21 15:46:37 +07:00
parent 475393809a
commit 40e6fd9ab5

View File

@@ -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 == "":