Your custom rules do not match any element on the page.
{
"errorCode": 500,
"error": "Unable to apply rules. One or more rules could not be applied."
}
This error only applies to Custom APIs and means two things —
- Your custom rule is trying to find an element which doesn’t exist on the page
- No other fields are being extracted that can be considered valid
In other words “I have nothing to extract according to the rules you gave me”.
If you want to avoid the error, you can add a wildcard field into the Custom rule you created. A wildcard field is one that always successfully extracts a value, so that Diffbot has something to extract even if the main content is not fetchable.
This can be something like a field called title
with a selector of title
, as every page has a title. Doing this will make sure that each URL always has at least a title field, and then anything else you define on top of this.
Still Not Working?
Let us help! Share your troubleshooting attempts with us at [email protected].