'Downloads an item from MediaWikiArticle.media and returns the content.
Note: images on Wikipedia can be quite large, and this method uses screen-scraping,
so Wikipedia might not like it that you download media in this way.
To save the media in a file:
data = article.download(media)
open(filename+extension(media),"w").write(data)'

def download(self, media, **kwargs):

    url = ('http://%s.wikipedia.org/wiki/File:%s' % (self.__dict__.get('language', 'en'), media))
    if (url not in cache):
        time.sleep(1)
    data = URL(url).download(**kwargs)
    data = re.search(('upload.wikimedia.org/.*?/%s' % media), data)
    data = ((data and URL(('http://' + data.group(0))).download(**kwargs)) or None)
    return data
