Picture Captionator – example of python screen scraping

captionator

Here’s an example of screen scraping with Python.  Give this script a list of words, and it will 1) find a picture of the object/person/whatever via Google Image Search, and also 2) generate a caption for the picture by selecting a random sentence from the object’s Wikipedia article.  Note that the captions may not relate directly to the selected picture.  In fact they often do not, to humorous effect.  So there you go, it just became a game.  Or a time waster.  Whatever it is, hopefully it can be a good example of how to do this kind of thing.

Requires Pygame to do the display.

Download: captionator_v0.1.zip

Advertisements

One response

  1. […] Scraping with Python I’ve done a few projects now involving screen scraping web data with Python.  I thought I would write a post […]

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: