I'm modifying the script to handle additional data elements for custom fields. That's coming along quite nicely, but I need a little help. As a measure of my profound coding-lameness, I'm unable to introduce a simple variable to add two data elements together.
I would like to combine MPAA (e.g., "R") and MPAA Reasons (e.g., "language and sexual references") into the same way it's expressed on IMDb (e.g., "Rated R for language and sexual references.")
So MPAA is retrieved with...
//MPAA
EndPos := PosFrom('style="width: 86px;', HTML, EndPos); //if no countries found set EndPos to the right position
curPos := PosFrom('">', HTML, EndPos) + 2;
EndPos := PosFrom('</td>', HTML, curPos);
AddFieldValue(mfMPAA, Copy(HTML, curPos, EndPos - curPos));
...and I'm adding MPAA reasons to a custom field with...
//MPAA Reasons
AddCustomFieldValueByName('MPAA', HTMLValues(HTML,
'<span>MPAA Reasons</span>', '</table>',
'<li>', '</li>',
', ', EndPos));
How can I modify this to combine the two and put the result into mfMPAA?
I realize this is a trivial thing—there are very few cases where the data won't already have come from IMDb—but I'll be able to use the same technique for other things.