I am trying to scrape tweets using twitter scraper I have tried a lot of solutions but it gives out empty list.
driver.find_elements_by_xpath('//div[@data-testid="tweet"]')
Whole chunk:
cards = driver.find_elements_by_xpath('//div[@data-testid="tweet"]')
if len(cards) > 0:
card = cards[0]
else:
raise NoSuchElementException('No cards were found')
error
NoSuchElementException Traceback (most recent call last)
/tmp/ipykernel_18368/2095008957.py in <module>
3 card = cards[0]
4 else:
----> 5 raise NoSuchElementException('No cards were found')
NoSuchElementException: Message: No cards were found
(It's same as that in twitter scraper github repository: https://github.com/israel-dryer/Twitter-Scraper )