Page 1 of 1
Imdb script.. pull release month and year
Posted: 2008-12-22 15:15:00
by scottdw
I am using the IMDB script which pulls the year the film was released. How can I have it pull the month as well???
Thanks,
Scott
Posted: 2008-12-22 23:25:55
by bad4u
If you want to save the release date in a format containing month and year, you will need to import it to another field on AMC, as the year field only supports integer numbers. So where should it be placed ?
Posted: 2008-12-23 00:55:25
by scottdw
It can be placed in Media Label, Source or Borrower. Can it be formatted a certain way??? I would like to have Year then a numbered month if possible like: 200805 for May of 2008. If that's not possible it's fine I will figure it out but first I need it to be imported
Thanks!!!!
Posted: 2008-12-23 12:33:37
by bad4u
To retrieve and format release date you can use something like
Code: Select all
// Release Date
if CanSetField(fieldSource) then
begin
Value := TextBetween(PageText, '<h5>Release Date:</h5>', '<');
Value := TextBetween(Value, #13#10, #13#10);
Value := TextAfter(Value, ' ');
Month := TextBefore(Value, ' ', '');
case Month of
'January': Month := '01';
'February': Month := '02';
'March': Month := '03';
end;
Value := RemainingText;
Year := TextBefore(Value, ' ', '');
Value := Year + Month;
SetField(fieldSource, Value);
end;
Add this code right behind the "Director" part of the script. Don't forget to define the variables "Month" and "Year" as strings on the beginning of "procedure AnalyzeMoviePage". There might be better solutions, but this code example should be quite easy to modify.
Posted: 2008-12-23 14:00:07
by scottdw
That worked perfectly!!!!!!
Thanks so much for taking the time to write that for me, I really appreciate it.
Happy Holidays!!!!