This script abuses the Indexing API which is intended for job posting and other specific purposes. https://developers.google.com/search/apis/indexing-api/v3/qu... Use at your own risk.
> Currently, the Indexing API can only be used to crawl pages with either JobPosting or BroadcastEvent embedded in a VideoObject.
I wanted to highlight (in addition to your statement) that JobPosting is a specific type of structured data.
If the target site doesn't have these elements, it may or may not work... or it may work for now, but not once they realized it's being used incorrectly
JobPosting structured data: https://developers.google.com/search/docs/appearance/structu...