On Feb 17, Hadley Rich <[EMAIL PROTECTED]> wrote:

Hi!

> Fetching a list of the episodes for The Sopranos (141842)

Hey!  Don't use The Sopranos as an example just because I'm Italian!
That's RUDE, CAPISCI?!?! ;-)

> results in episodes[1] actually being season 2, episodes[2] not
> existing, the rest of the seasons are fine.

I've run a fast test, and unfortunately I cannot reproduce this problem.
In the attachments there are both the used script and its output; as you
can see it lists every episodes.

I suspect this can be a bug in the portion of code that handles optionals
information like "Next US airings", but I can't say for sure until I'll
reproduce the bug.
If possible, try the script and let me know if your output is different.

> I noticed that you mentioned in another thread that you didn't like
> the episode list scraping code

Yup; the parser for some pages (news, dvd, episodes, airing dates and
some others) were written in a rush, so there are for sure a lot of
bugs, there. :-/
Not that the rest of the code is gorgeous, btw. ;-)

> and also with the impending IMDB site redesign you may not want to
> bother fixing this.

It's still unclear how much it will affect many parsers; for sure
a lot of minor changes will be required, but _maybe_ very few major
modifications will be needed.  Hopefully.
The 'mobile' data access system is a different beast: it will probably
just blow up completely, and will require a lot of work. :-/

> Cheers, I'm enjoying playing with the code, haven't had a chance
> to dig into it yet but maybe I will at some stage.

You're welcome! :-)


Thanks for the report,
-- 
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/
#!/usr/bin/python

from imdb import IMDb
from imdb.helpers import *

ia = IMDb()
ts = ia.get_movie('141842') # The Sopranos.
ia.update(ts, 'episodes')

for season in sortedSeasons(ts):
    print 'Season #%s has %s episodes.' % (season,
                                            len(ts['episodes'][season]))


for episode in sortedEpisodes(ts):
    print 'Season %s, episode %s: %s' % (episode['season'],
                                            episode['episode'],
                                            episode['title'])

Season #1 has 13 episodes.
Season #2 has 13 episodes.
Season #3 has 13 episodes.
Season #4 has 13 episodes.
Season #5 has 13 episodes.
Season #6 has 12 episodes.
Season 1, episode 1: Pilot
Season 1, episode 2: 46 Long
Season 1, episode 3: Denial, Anger, Acceptance
Season 1, episode 4: Meadowlands
Season 1, episode 5: College
Season 1, episode 6: Pax Soprana
Season 1, episode 7: Down Neck
Season 1, episode 8: The Legend of Tennessee Moltisanti
Season 1, episode 9: Boca
Season 1, episode 10: A Hit Is a Hit
Season 1, episode 11: Nobody Knows Anything
Season 1, episode 12: Isabella
Season 1, episode 13: I Dream of Jeannie Cusamano
Season 2, episode 1: Guy Walks Into a Psychiatrist's Office
Season 2, episode 2: Do Not Resuscitate
Season 2, episode 3: Toodle-fucking-oo
Season 2, episode 4: Commendatori
Season 2, episode 5: Big Girls Don't Cry
Season 2, episode 6: The Happy Wanderer
Season 2, episode 7: D-Girl
Season 2, episode 8: Full Leather Jacket
Season 2, episode 9: From Where to Eternity
Season 2, episode 10: Bust-Out
Season 2, episode 11: House Arrest
Season 2, episode 12: The Knight in White Satin Armor
Season 2, episode 13: Funhouse
Season 3, episode 1: Mr. Ruggerio's Neighborhood
Season 3, episode 2: Proshai, Livushka
Season 3, episode 3: Fortunate Son
Season 3, episode 4: Employee of the Month
Season 3, episode 5: Another Toothpick
Season 3, episode 6: University
Season 3, episode 7: Second Opinion
Season 3, episode 8: He Is Risen
Season 3, episode 9: The Telltale Moozadell
Season 3, episode 10: To Save Us All from Satan's Power
Season 3, episode 11: Pine Barrens
Season 3, episode 12: Amour Fou
Season 3, episode 13: Army of One
Season 4, episode 1: For All Debts Public and Private
Season 4, episode 2: No Show
Season 4, episode 3: Christopher
Season 4, episode 4: The Weight
Season 4, episode 5: Pie-o-My
Season 4, episode 6: Everybody Hurts
Season 4, episode 7: Watching Too Much Television
Season 4, episode 8: Mergers and Acquisitions
Season 4, episode 9: Whoever Did This
Season 4, episode 10: The Strong, Silent Type
Season 4, episode 11: Calling All Cars
Season 4, episode 12: Eloise
Season 4, episode 13: Whitecaps
Season 5, episode 1: Two Tonys
Season 5, episode 2: Rat Pack
Season 5, episode 3: Where's Johnny?
Season 5, episode 4: All Happy Families
Season 5, episode 5: Irregular Around the Margins
Season 5, episode 6: Sentimental Education
Season 5, episode 7: In Camelot
Season 5, episode 8: Marco Polo
Season 5, episode 9: Unidentified Black Males
Season 5, episode 10: Cold Cuts
Season 5, episode 11: The Test Dream
Season 5, episode 12: Long Term Parking
Season 5, episode 13: All Due Respect
Season 6, episode 1: Members Only
Season 6, episode 2: Join the Club
Season 6, episode 3: Mayham
Season 6, episode 4: The Fleshy Part of the Thigh
Season 6, episode 5: Mr. & Mrs. John Sacrimoni Request
Season 6, episode 6: Live Free or Die
Season 6, episode 7: Luxury Lounge
Season 6, episode 8: Johnny Cakes
Season 6, episode 9: The Ride
Season 6, episode 10: Moe n' Joe
Season 6, episode 11: Cold Stones
Season 6, episode 12: Kaisha
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to