For a project, I want to be able to create a dataset of tweets containing some particular string of symbols. Since I would also like to go as far back in time as possible, I tried using the GetOldTweets script ( https://github.com/Jefferson-Henrique/GetOldTweets-python ) mentioned here: https://stackoverflow.com/a/35077920/5858873 .
The issue is, it isn't able to extract tweets containing symbols as input. In fact, one cannot even search directly on Twitter for any tweets consisting of required symbols.
To more clearly explain the problem, consider the following sample case. I would l like to extract all tweets containing the string '!!!' within the last two years.
What is the best way to do this (if this even is doable)?
Navigate to your app dashboard. Select the app you've enabled with the Tweets and users preview, then click Details. Select the Keys and tokens tab. In the Consumer API Keys section, copy the values for API Key into consumer_key and API Secret Key into consumer_secret .
Hashtag object The entities section will contain a hashtags array containing an object for every hashtag included in the Tweet body, and include an empty array if no hashtags are present. The PowerTrack # Operator is used to match on the text attribute.
You can create your own regular expression on the basis of your requirement and
then hit the twitter data to extract the specific tweets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With