Scrape Twitter Tweet Text with UBot

Twitter Logo Social Network

This UBot code quickly and easily scrapes 500 tweets from a Twitter search:

clear list(%tweets)
ui text box("Hashtag Search Term:",#searchTerm)
wait for browser event("Everything Loaded","")
loop(50) {
run javascript("window.scrollTo(0,document.body.scrollHeight);")
add list to list(%tweets,$scrape attribute(<class="TweetTextSize js-tweet-text tweet-text">,"innertext"),"Delete","Global")
save to file("{$special folder("Application")}\\tweet-text-{#searchTerm}.txt",%tweets)


This is done within the internal UBot browser without additional plugins.


Legal Issues can be raised by the use of web crawling and scraping tools. Twitter gives access to data analysts, but free access is limited. So you might need to pay a premium for unlimited access. If you scrape without the required permissions, it is illegal. Twitter Developers can use their API for obtaining information for apps, tools and market analysis

Be the first to comment

Leave a Reply

Your email address will not be published.