Adding another if statement to catch the number let me run the script again, this worked for me:
if MovieNumber = '' then
MovieNumber := TextBetween(PageText,'"meta":{"canonicalId":"tt', '","publicationStatus');

Maybe more things need to be adjusted, there's nothing like "rel="canonical"" or "legacy/title" in the page source anymore.