Image Searches in Twitter with Webometric Analyst
Webometric Analyst can be used to download images from Twitter or Tumblr. It will also create lists of the most frequently downloaded identical images. The process takes two stages: first download the tweets; and second, extract, download and count the images in the downloaded tweets.
Stage 1: Downloading the Tweets
Images cannot be searched for in Twitter by content and so you will need to search for relevant posts using keywords to match the text in the posts. It is also possible to search for a geographic location.
Simple Twitter search: Create a plain text file with one or more keyword searches, each on a separate line. example.
Complex search: To search for posts in Twitter, create a plain text file containing a list of URLs in one or more of the following formats. The first format is a keyword search – replace the text REPLACEME with the keywords that you want to use for your search. If there are spaces in your URL replace them with a plus sign+. The second is a keyword search combined with a geographic search. Replace REPLACEME with your keywords as above and for the geocode part, change LONG to the longitude and LAT to the latitude of the centre of the area that you want to cover, and then change RADIUS to the distance (km) from the centre of the circle inside which you want to collect tweets.
- https://api.twitter.com/1.1/search/tweets.json?q= REPLACEME &count=100&geocode=LONG%2CLAT%2CRADIUS
- https://api.twitter.com/1.1/search/tweets.json?q=&count=100&geocode= LONG%2CLAT%2CRADIUS
Examples: The second is a geographic search covering the UK and Ireland, whereas the third covers the USA.
- https://api.twitter.com/1.1/search/tweets.json?q= brian+jones &count=100&geocode=54%2C-3%2C500km
- Example file of Twitter search URLs
After creating the simple search or complex search plain text file, start Webometric Analyst, select the Twitter tab and then click the Continuously Run List of Twitter Searches from File button and select your file of Twitter Searches, created as above.
You will be asked to log in to Twitter in a web browser and shown a PIN as below (but a different number).
Copy and paste the PIN to give permission to run searches.
When you have collected tweets for long enough, click the stop button and wait for it to finish.
Stage 2: Downloading the Images
Webometric Analyst will search the downloaded tweets for images and then download the images. If you have downloaded hours or days of tweets/posts then it may take hours or days to download the images. It may also take up a lot of disk space to save all the images.
To download and count the images, start Webometric Analyst and select Download Twitter Pictures from the Pics menu and choose the file of downloaded Tweets.
When Webometric Analyst has finished you will have a folder containing all the images in the posts, ignoring all posts without image links and all broken or missing links. You will also get a list of the most tweeted images, together with the associated tweets, and a list of all tweets and their images, both in the form of web pages.
Here is an example of the files that Webometric Analyst will create.
The results files include:
* a list of all tweets (selfieQueries_Tweets.txt)
* a folder with all the downloaded pictures (selfieQueries_Tweets URLs_pics)
* a webpage listing the most tweeted (up to) 1000 pictures from the results and all their tweets (selfieQueries_Tweets URLs_piclog top6alltweets.html)
* a webpage listing the most tweeted (up to) 1000 pictures from the results and 2 tweets per picture (selfieQueries_Tweets URLs_piclog top6 2tweets.html)
* a webpage listing a random selection of up to 1000 pictures from the results and all their tweets (selfieQueries_Tweets URLs_piclog rand6alltweets.html) (in case you need a random sample for a content analysis)
* a webpage listing a random selection of up to 1000 pictures from the results and 2 tweets per picture (selfieQueries_Tweets URLs_piclog rand6 2tweets.html)