# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# pyahoo.harvest.download()

## Syntax

    harvest(query, size=MEDIUM, dissect=False, path="")

## Description

Harvests images from Yahoo! Downloads images from Yahoo! using the given query and size, which is either SMALL, MEDIUM, LARGE or WALLPAPER.

The optional dissect parameter specifies whether or not to look for the query's components: this means that when gathering images of a tree, Pyahoo will also look for images of leaves, trunks, bark, and so on. Pyahoo must be able to import WordNet for this functionality, so the WordNet module (or an alias of) should be on the same path as the Harvest module.

The harvest() function is multi-threaded, meaning that multiple downloads are started at the same time.

## Example

Gathers tree images from the internet, displays them in NodeBox, and then deletes them from the harddisk.

    from pyahoo import harvest
      images = harvest.download("typography", harvest.SMALL, dissect=True)
      for img in images:
          image(img, random(WIDTH), random(HEIGHT))
    harvest.clear()