Semi Gr | 13 Jul 02:27

fetching data from IMDB

Hi,

looks like IMDB again changed the html code, and Tellico 1.3.3
doesn't fetch plot summary.
I played with the code and found out that the following change in imdbfetcher.cpp:
instead of
QRegExp plotRx(QString::fromLatin1("Plot (?:outline|summary):(.*)<[^/].*</"), false);
put
QRegExp plotRx(QString::fromLatin1("Plot:</h5>(.*)(</|\\|)"), false);
does the trick. The only problem is that if there is no plot summary you end up with
the text "add synopsis" as a plot summary in tellico. So it's not perfect, but it's better then
nothing.

Disclaimer: I'm not really good in C++ or regular expressions.

Semi


_______________________________________________
tellico-users mailing list
tellico-users@...
http://forge.novell.com/mailman/listinfo/tellico-users
Robby Stephenson | 14 Jul 08:19

Re: fetching data from IMDB

Hi,

On Saturday 12 July 2008, Semi Gr wrote:
> Hi,
>
> looks like IMDB again changed the html code, and Tellico 1.3.3
> doesn't fetch plot summary.

Heh, it's all fun when they do that, eh? I think they have a schedule just 
so they break all the software out there that parses their output.

> I played with the code and found out that the following change in
> imdbfetcher.cpp:
> instead of
> QRegExp plotRx(QString::fromLatin1("Plot
> (?:outline|summary):(.*)<[^/].*</"), false);
> put
> QRegExp plotRx(QString::fromLatin1("Plot:</h5>(.*)(</|\\|)"), false);
> does the trick. The only problem is that if there is no plot summary you
> end up with
> the text "add synopsis" as a plot summary in tellico. So it's not
> perfect, but it's better then
> nothing.

Well, if it works! I'm running around out of town for a week, so when I get 
back, I'll take a look.

Robby
Robby Stephenson | 23 Jul 08:00

Re: fetching data from IMDB

On Saturday 12 July 2008, Semi Gr wrote:
> Hi,
>
> looks like IMDB again changed the html code, and Tellico 1.3.3
> doesn't fetch plot summary.

I updated the regexp in SVN, if anyone needs  the update.

Robby

Gmane