code: def getMoviesFromJSON(jsonURL):
      
      response = urllib.request.urlopen(jsonURL)
      jsonData = response.read().decode('utf-8')
      objects = json.loads(jsonData)
      # make it work for search urls
      if jsonURL.find('quickfind') != -1:
          objects = objects['results']
      optionalInfo = ['actors','directors','rating','genre','studio','releasedate']
      movies = []
      for obj in objects:
          movie = Movie()
          movie.title = obj['title']
          movie.baseURL = obj['location']
          movie.posterURL = obj['poster']
          # sometimes posters don't have http part
          if movie.posterURL.find('http:') == -1:
              movie.posterURL = "http://apple.com%s" % movie.posterURL
          movie.trailers = obj['trailers']
  
          for i in optionalInfo:
              if i in obj:
                  setattr(movie, i, obj[i])
  
          movies.append(movie)
  
      return movies
docs: Main function for this library
  
      Returns list of Movie classes from apple.com/trailers json URL
      such as: http://trailers.apple.com/trailers/home/feeds/just_added.json
  
      The Movie classes use lazy loading mechanisms so that data not
      directly available from JSON are loaded on demand. Currently these
      lazy loaded parts are:
       * poster
       * trailerLinks
       * description
  
      Be warned that accessing these fields can take long time due to
      network access. Therefore do the loading in thread separate from
      UI thread or your users will notice.
  
      There are optional fields that may or may not be present in every
      Movie instance. These include:
       * actors (list)
       * directors (list)
       * rating (string)
       * genre (string)
       * studio (string)
       * releasedate (sring)
      Please take care when trying to access these fields as they may
      not exist.