Tumblr Image Bot: a friendly social-media robot

April 12, 2018 - All

The ARChive of Contemporary Music website features many image galleries depicting items from the collection, including records, CDs, sheet music, music-related books, and ephemera. Since the launch of the site in May 2014, web traffic to the galleries has been relatively low, about a third of the number of users that hit the homepage. The ARC’s social media posts also have relatively low reach and low engagement (e.g., average interaction per tweet = 1). By repurposing interesting, fun, and quirky digital content in the context of social media, perhaps we can better engage followers, attract new users, and drive new traffic to the site, potentially attracting new donors to the non-profit archive. To efficiently capture and repost this content, I wrote two complementary scripts. The first scrapes image URLs and metadata from the ARC photo gallery pages, which are generated by the Next-Gen Gallery plugin for WordPress. This data is written out to a JSON file. The second script uses Pytumblr, a Python Tumblr API client, to build and send a user-determined number of randomly-selected photo posts to Tumblr along with appropriate caption text and tags. The JSON file is then updated to indicate which images have been posted by means of a true/false value. Why Tumblr? It’s free, many themes support a photo-gallery style layout, users can queue and schedule up to 300 posts for publication, and it can serve as a social media hub – using a service like IFTTT.com, Tumblr photo posts can trigger parallel photo posts on Twitter and Facebook.

› tags: culture / programming / python /