def itunes_art(album):
 search_string = ((album.albumartist + ' ') + album.album).encode('utf-8')
 try:
  try:
   itunes_album = itunes.search_album(search_string)[0]
  except Exception as exc:
   log.debug('fetchart: iTunes search failed: {0}'.format(exc))
   return
  if itunes_album.get_artwork()['100']:
   small_url = itunes_album.get_artwork()['100']
   big_url = small_url.replace('100x100', '1200x1200')
   (yield big_url)
  else:
   log.debug(u'fetchart: album has no artwork in iTunes Store')
 except IndexError:
  log.debug(u'fetchart: album not found in iTunes Store')

def itunes_art ( album ) : search_string = ( ( album . albumartist + ' ' ) + album . album ) . encode ( 'utf-8' ) try : try : itunes_album = itunes . search_album ( search_string ) [ 0 ] except Exception as exc : log . debug ( 'fetchart: iTunes search failed: {0}' . format ( exc ) ) return if itunes_album . get_artwork ( ) [ '100' ] : small_url = itunes_album . get_artwork ( ) [ '100' ] big_url = small_url . replace ( '100x100' , '1200x1200' ) ( yield big_url ) else : log . debug ( u'fetchart: album has no artwork in iTunes Store' ) except IndexError : log . debug ( u'fetchart: album not found in iTunes Store' )
return art url from itunes store given an album title .