English > Scripts and Templates

CDUniverse script

(1/3) > >>

Isolki:
Hello everyone,

I just registered on this forum and i wanted to post a script i made for CDUniverse.
It's not that easy to handle all particular pages, so there may be error messages sometimes  :-[
For now, only the following movie fields are updated from the website :
- Poster, URL, Original title, Studio, Actors and Year

Isolki

[attachment deleted by admin]

Ivek23:
Thank you, Isolki.
You can add anything else, for example Rating, Running Time or the Release Date.

For Release Date  use this one piece of code:
--- Code: ---AddFieldValueXML('release', lText);
--- End code ---

To help the attached list.

PVD XML List attached.

[attachment deleted by admin]

Isolki:
You're welcome  :)
I've just added the fields you told me about.
The following fields are now updated from the website :
- Poster, URL, Original title, Orig Year, Category, Studio, Rating, Description, Duration and Release Date.

I've also improved the Actors import.
Here is the version 0.2.0.0

[attachment deleted by admin]

Ivek23:
Rating does not work.

It is necessary to add this one piece of code,

--- Code: ---//AddFieldValue(K_MOVIE_MPAA, lText);
AddFieldValueXML('mpaa', lText);
--- End code ---
or example, this

--- Code: ---{ Movie mpaa }
lPosition := Pos(K_MOVIE_MPAA_TRT, HTML);
lText := TextBetween(HTML, K_MOVIE_MPAA_BGN, K_MOVIE_MPAA_END, False, lPosition);
//AddFieldValue(K_MOVIE_MPAA, lText);
AddFieldValueXML('mpaa', lText);
LogMessage('lMoviempaa : ' + lText);
--- End code ---
and will it work this time.

You can add this -  DVD Features:

--- Code: ---K_MOVIE_DVD_TRT = ' DVD Features</span></span></h2>';
K_MOVIE_DVD_BGN = '<p>';
K_MOVIE_DVD_END = '</p></div>';
        .
        .
        .
        .
        .
{ Movie dvd }
lPosition := Pos(K_MOVIE_DVD_TRT, HTML);
lPosBgn := PosFrom(K_MOVIE_DVD_BGN, HTML, lPosition);
lPosEnd := PosFrom(K_MOVIE_DVD_END, HTML, lPosBgn);
lText := Trim(Copy(HTML, lPosBgn+3, lPosEnd - lPosBgn-3));
AddFieldValue(K_MOVIE_FEATURES, lText);
LogMessage('lMovieDvd : ' + lText);

--- End code ---

Ivek23:
Duration also does not work.

It is necessary to add this one piece of code,

--- Code: --- //K_MOVIE_RUNNING_TIME_TRT = '">Running Time</td>';
//K_MOVIE_RUNNING_TIME_BGN = '<td>';
//K_MOVIE_RUNNING_TIME_END = ' Minutes</td></tr>';
        .
        .
        .
        .
        .
{ Movie running time }
lText := FloatToStr(StrToFloat(HTMLValues2(HTML, '">Running Time</td>', '</tr>', '<td>', ' Minutes</td></tr>', ', ', lPosEnd)) * 60); 
AddFieldValueXML('length', lText);
LogMessage('Running time : ' + lText);
--- End code ---
and will it work this time.

Navigation

[0] Message Index

[#] Next page

Go to full version