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
Imdb script.. pull release month and year
To retrieve and format release date you can use something like
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.
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;