We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15f5c72 commit 1aee5b7Copy full SHA for 1aee5b7
scraper.py
@@ -21,8 +21,12 @@ def extract_tweets(containers):
21
By.XPATH, './/div[@data-testid="User-Name"]//span').text
22
23
# Extract the tweet text
24
- tweet = container.find_element(
25
- By.XPATH, './/div[@data-testid="tweetText"]').text
+ tweet_texts = container.find_element(
+ By.XPATH, './/div[@data-testid="tweetText"]')
26
+
27
+ tweet = ""
28
+ for text in tweet_texts.find_elements(By.XPATH, './/span'):
29
+ tweet += text.text+" "
30
31
# Add to the lists
32
print(f"User: {user}")
tweets.csv
0 commit comments