def get_pl_from_json(pldata):
 try:
  items = pldata['items']
 except KeyError:
  items = []
 results = []
 for item in items:
  snippet = item['snippet']
  results.append(dict(link=item['id'], size=item['contentDetails']['itemCount'], title=snippet['title'], author=snippet['channelTitle'], created=snippet['publishedAt'], updated=snippet['publishedAt'], description=snippet['description']))
 return results

def get_pl_from_json ( pldata ) : try : items = pldata [ 'items' ] except KeyError : items = [ ] results = [ ] for item in items : snippet = item [ 'snippet' ] results . append ( dict ( link = item [ 'id' ] , size = item [ 'contentDetails' ] [ 'itemCount' ] , title = snippet [ 'title' ] , author = snippet [ 'channelTitle' ] , created = snippet [ 'publishedAt' ] , updated = snippet [ 'publishedAt' ] , description = snippet [ 'description' ] ) ) return results
process json playlist data .