print "***IMDbLib.py Example Script***" print "===============================\n\n\n\n" print "How to import IMDbLib.py into your script:" print "------------------------------------------\n" print "(1) import IMDbLib" print "(2) from IMDbLib import IMDb\n" print "If you chose to use import method (1), you must reference the library's" print 'name before using the class, for example:\n"IMDbLib.IMDb(url)"' print 'otherwise, to use import method (2), just simply use:\n"IMDb(url)"\n\n' print "Selecting Your Movie With An IMDb URL:" print "--------------------------------------\n" print '(1) Movie = IMDbLib.IMDb("http://www.imdb.com/title/tt0265666/")' print '(2) Movie = IMDb("http://www.imdb.com/title/tt0265666/")\n' print "You MUST reference the IMDb class, with a valid IMDb url, to use this library." print "This will retrieve all available information from the url you provided." print "IMDb URLs come in a few different formats, for example:" print '"http://www.imdb.com" & "http://us.imdb.com"' print "Both the URL types above are valid since both sites use the same page formatting.\n\n" print "Retrieving Parsed IMDb Information:" print "-----------------------------------\n" print "Example 1 - How to retrieve IMDb information:" print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" print "Usage:" print " print str(Movie.Title)\n" print "Result:" print " The Royal Tenenbaums (2001)" print '\nYou can replace "Title" in "Movie.Title" with any of the following words:\n' print "Directors, Writers, Genres, Details, Year, Tagline, Plot, Rating, MPAA" print "Runtime, Cast, Countries, Languages\n" print "Example 2 - How to re-format entries in a list:" print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" print "Usage:" print " for Writers in Movie.Writers:" print " print Writers" print "Result:" print " Wes Anderson\n Owen Wilson" print "\nExample 3 - How to re-format keys in a dictionary:" print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" print "Usage:" print " Cast = Movie.Cast" print " for k in Cast.keys():" print " print '%-30.30s as %s'%(k,Cast[k])" print "Result:" print " Grant Rosenmeyer as Ari Tenenbaum" print " Irene Gorovaia as Young Margot Tenenbaum" print "\n\nFull List Of Available Functions:" print "---------------------------------\n" print "Title (Movie Title, as a String)" print "Directors (Director(s), in a List)" print "Writers (Writer(s), in a List)" print "Year (Year, as a String)" print "Genres (Genre(s), in a List)" print "Tagline (Tagline, as a String)" print "Plot (Plot Outline, as a String)" print "Rating (Movie Rating, as a String)" print "MPAA (MPAA Rating, as a String)" print "Runtime (Film Length, in a List)" print "Details (Full Movie Details, as a String)" print "Countries (Countries, in a List)" print "Languages (Languages, in a List)" print "Cast (Actors and Characters, in a Dictionary)"