On Feb 04, Jean-Yves Avenard <jyaven...@gmail.com> wrote:

> Actually, that's quite the opposite.  The IMDB mythtv module used
> to be written in perl, now it's in Python using IMDbPY

I know that, but things are changing again, if I've not understood wrong.
There are some worries about the licence of the data they need,
I think (I suppose that not everything they like to retrieve is
distributed in the plain text data files).

> For the change in the plot format, I've submitted a patch to mythtv.
> What I did is compare the size of both blocks and assume the longest
> is the actual text.

Makes sense if you want to support both versions.
As said, now _every_ string is in the format TEXT[::OPTIONAL_NOTE]
with a single (optional) :: to separate them.
For the history books: movie['plot'] and person['biography'] were
the only two items affected by the change.

Uniformity lead to a new function, makeTextNotes, in the 'helpers'
module, which can be used to generate a function to pretty-print
these kind of information.

E.g.:
  from imdb.helpers import makeTextNotes

  # Create a function with a conditional replacement.
  conditionalRepl = makeTextNotes(u'TXT: %(text)s<if notes> NOTE: %(notes)s</if 
notes>')

  t1 = u'119 min'
  t2 = u'120 min::(Italy)'

  print conditionalRepl(t1)
  print conditionalRepl(t2)

> > You have to fix the code in the MythTV script, sorry.
> 
> already did it

Thank you!

> > An unfortunate choice of title. ;-) This was fixed only yesterday
> > in the SVN version: the IMDb web server slightly changed its
> > behavior, for queries with a long list of results.
> 
> I can guarantee you that it works with 3.6 !

I'm sure, but in the meanwhile we completely changed the 'http' set
of parsers (from a SAX-based approach to a DOM-based one - with
lxml or BeautifulSoup) :-)
This and minor changes to the web pages raised the problem (which,
in turn, I'm not even sure to have completely fixed: it's quite
difficult to debug).

> I'm guessing the problem is in the search for TV series, as series
> support in 3.6 wasn't working that well.

No, the problem is that now a common word like "house" returns
a list of results _AND_ a notice specifying that there are many
other results.  Previously you got a list of results _OR_ the notice.
Mix these with some bad assumptions made writing the parsers, and... ;-)


Bye,
-- 
Davide Alberani <davide.alber...@gmail.com> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to