Davide Alberani | 16 Jun 22:02 2010
Picon

Re: a person photo

On Jun 15, Karim Ihab <kihab@...> wrote:

> Dear all,

Wrong address: it should go to imdbpy-help@... :-)

> But it didn't include any photos or posters or any thing that I can use can
> u help!!!!!

Person instances (can) have the 'headshot' keyword:
  person.get('headshot')

Will give you 'http://ia.media-imdb.com/images/M/MV5BMTQzNjU3MDczN15BMl5BanBnXkFtZTYwNzY2Njc4._V1._SX94_SY140_.jpg'

You can get a larger version of the image with a function in
the 'helpers' module.  E.g.:
   import imdb.helpers

   print imdb.helpers.fullSizeCoverURL(person)

It works for Movie instances, too.

Bye!
--

-- 
Davide Alberani <davide.alberani@...> [GPG KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
(Continue reading)

Davide Alberani | 20 Jun 14:23 2010
Picon

IMDbPY 4.6 released

IMDbPY 4.6 is available: http://imdbpy.sf.net/

In this release, a lot of minor fixes and some overall improvements.

Sorry for the long delay -  we really need a release manager. :-)

Have fun!
--

-- 
Davide Alberani <davide.alberani@...> [GPG KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Mike Castle | 25 Jun 06:19 2010
Picon

TV series with unknown episode numbers

First, look at this page, specifically the ``unknown'' season:
http://www.imdb.com/title/tt0169455/episodes#season-unknown

Now, run the following code (sys.path adjusted as necessary):
#!/usr/bin/python

import sys
sys.path.insert(0, '/home/nexus/workspace/imdbpy')
import imdb

print imdb.VERSION
imdb_http = imdb.IMDb()
m = imdb_http.get_movie('0169455')   # Inside the Actor's Studio
imdb_http.update(m, 'episodes')
eps = m['episodes']
print len(eps['unknown']),  eps['unknown'].keys()

Output is:
4.6
1 ['unknown']

the 'unknown' season has only 1 episode, rather than the expected 9.

I suspect that the proper way to fix this is by submitting updates to
IMDB.  But, anyway this could be adjusted for in code?  Maybe episodes
could be unknown1, unknown2, unknown3, etc.... ?

Here's a hack for that, though we all know globals are evil

--- a/imdb/parser/http/movieParser.py   Sun Jun 20 09:37:51 2010 +0200
(Continue reading)

Davide Alberani | 26 Jun 10:01 2010
Picon

Re: TV series with unknown episode numbers

On Jun 25, Mike Castle <dalgoda@...> wrote:

> First, look at this page, specifically the ``unknown'' season:
> http://www.imdb.com/title/tt0169455/episodes#season-unknown

I see - thank you very much for the report and the idea for the fix!

I've implemented a similar solution in the Mercurial
repository: http://imdbpy.sf.net/?page=download#hg

In fact it's not a great improvement: to tell the truth, the numer
of the episode should not be computed in the _build_episode function (but
right now I don't have time for a better solution, and anyway... this
one works :-)

Thanks!
--

-- 
Davide Alberani <davide.alberani@...> [GPG KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Mike Castle | 27 Jun 04:17 2010
Picon

Re: TV series with unknown episode numbers

On Sat, Jun 26, 2010 at 1:01 AM, Davide Alberani
<davide.alberani@...> wrote:
> In fact it's not a great improvement: to tell the truth, the numer
> of the episode should not be computed in the _build_episode function (but
> right now I don't have time for a better solution, and anyway... this
> one works :-)

I concur; that's not the best place to keep it.  I assume that the bit
that processes XML or whatever would be the ideal place to have a
counter to keep track of it?  But I was busy and didn't have time to
figure out your entire code base.   :->

For a personal fix, I ended up using just an integer instead of the
unknownN type, mostly because the tool that I was writing needs an
integer, and it seemed silly to take an integer counter, turn it into
a string, only to have to parse it to turn it back into an integer
again.  I've not yet looked at yours, though.

I suppose on of the problems with this is that there is no good way to
guarantee an order.  I imagine that most of the time it will be the
same, but it'll be a the whim of the order that IMDB sends the data,
rather than anything that we can predetermine.

mrc

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
(Continue reading)

Davide Alberani | 27 Jun 09:46 2010
Picon

Re: TV series with unknown episode numbers

On Jun 27, Mike Castle <dalgoda@...> wrote:

> I assume that the bit that processes XML or whatever would be the
> ideal place to have a counter to keep track of it?

Sure, or - even better - rethink the data structure: after all,
maybe we don't really need a dictionary of dictionaries to store
seasons/episodes.
The current choice was probably made to accomodate things like
"unknown season" or "episode 0", but maybe we don't need these
pieces of information and move to a list of lists or a dictionary
of lists.

> But I was busy and didn't have time to figure out your entire
> code base.   :->

Feel free to poke around, clone/fork the repository, and ask if
you need help!

> For a personal fix, I ended up using just an integer
  [...]
> I've not yet looked at yours, though.

It does the same. :-)

> I suppose on of the problems with this is that there is no good
> way to guarantee an order.

That's why there are the sortedSeasons and sortedEpisodes
functions in the 'helpers' module (but they can't guarantee
(Continue reading)


Gmane