Question

Is there a way to download pictures from twitter using the tweetsearcher?

  • 13 June 2016
  • 1 reply
  • 0 views

Badge

as the title says can you download pictures as jpg or similar that people post on twitter?


1 reply

Userlevel 2
Badge +11

Hi @jamiefinney

Yes, it is pretty easy - once TweetSearcher returns the JSON in _tweet_search_result attribute, you can create a new attibute (for example, _image_url) with JSONExtractor with the following syntax:

json["entities"]["media"][*]["media_url_https"]

After this transformer, use ImageFetcher with _image_url, it will return the image.

If you also would like to get aTwitter profile image, use json["user"]["profile_image_url_https"].

I used this technique for our FMECoin contest - see the article here:

http://blog.safe.com/2016/06/fmecoin-whats-behind-...

Dmitri

Reply