We look for ad information in the library results in an ad_library_main object. Some recent results do not contain this field name (for example).
I've changed the code so that it no longer fails on these cases, but allows the end user (such as the index project) to decide what to do, which may be simply to ignore these results.
In the longer run we should investigate how to handle these results properly, and why we get this form for some queries and not others. The JSON object we are inspecting doesn't seem to contain important pieces of the ad metadata anywhere (i.e. they're not just missing an explicit ad_library_main), but this information is clearly available in the browser.
We look for ad information in the library results in an
ad_library_mainobject. Some recent results do not contain this field name (for example).I've changed the code so that it no longer fails on these cases, but allows the end user (such as the index project) to decide what to do, which may be simply to ignore these results.
In the longer run we should investigate how to handle these results properly, and why we get this form for some queries and not others. The JSON object we are inspecting doesn't seem to contain important pieces of the ad metadata anywhere (i.e. they're not just missing an explicit
ad_library_main), but this information is clearly available in the browser.