On Mar 25, Ivan Kedrin <[EMAIL PROTECTED]> wrote:

> What's the best approach to keep one's IMDB database up to date? Can
> this be done with IMDdPy?

Hi,
unfortunately, at this time, IMDbPY can only import the whole plain
text files database.
You can leave out unwanted information (not downloading the unnecessary
files), but once you've imported the data in a SQL database, you can't
update it: you need to drop the table (this is the first thing done by
the imdbpy2sql.py script) and fill it again with the new information.

IMDb distributes also (weekly, if I recall correctly) "diffs" - in fact
simple patches - against the plain text data files.
I have in my head a general outline of how to support these incremental
updates, but I fear that the implementation is outside my skills as a
programmer.
Consider that the imdbpy2sql.py script should be rewritten (almost)
from zero and that there will be an impressive number of problems to
deal with: performances, memory footprint, error handling and so on.

If someone is willing to help, I can describe what I have in mind, but
for sure I will not start coding this beast by myself. :-)

> Also, any ideas on the error below?

Yup; it' unbelievable how much crap there can be in the plain text
data files. :-)

>     seas, epn = sen[2:-1].split('.')

The solution is to change the 317th line in imdb/utils.py from:
    if sen:

 to:
    if sen and sen[2:-1].find('.') != -1:


The fix will be in the CVS (redesign branch) with a few minutes/hours.
Please try it and let me know if the error persists.


Thanks for the bug report: I'll add your name to the CREDITS.
-- 
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

-------------------------------------------------------------------------
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