Disable script on condition

Hi, from this page I run this script, which extracts, in the field “Name”, the publisher from the bibliographic item (Feltrinelli , in the example). I would like the script to run only once, that is to be disabled when on the previous page there is the expression “Editore moderno” under the heading “Persons, institutions and families”. In this case, infact, I would have to extract (manually) in the field “Name”, the authour from this page.