You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to preface this by saying that I'm not sure whether this actually warrants a change in the library. I just wanted to report this (and my workaround) in case others run into it, and in case there is anything that might be worthwhile adding to the library.
I've encountered a website that contains a lot of good structured data, but unfortunately also contains several links with an empty rel attribute in the footer, unrelated to the structured data type I was trying to retrieve.
Example:
<ahref="/some/link" rel="">Some Link</a>
This causes Jkphl\Micrometa\Domain\Exceptions\InvalidArgumentException: Empty type list is not allowed to be thrown which prevents me from grabbing any of the actual data I was looking for which was already successfully retrieved.
From what I can tell, an empty rel attribute isn't strictly invalid, even if unusual.
My workaround is to retrieve the HTML manually, and remove all empty rel attributes before passing it to Micrometa.
I'd like to preface this by saying that I'm not sure whether this actually warrants a change in the library. I just wanted to report this (and my workaround) in case others run into it, and in case there is anything that might be worthwhile adding to the library.
I've encountered a website that contains a lot of good structured data, but unfortunately also contains several links with an empty
rel
attribute in the footer, unrelated to the structured data type I was trying to retrieve.Example:
This causes
Jkphl\Micrometa\Domain\Exceptions\InvalidArgumentException: Empty type list is not allowed
to be thrown which prevents me from grabbing any of the actual data I was looking for which was already successfully retrieved.From what I can tell, an empty
rel
attribute isn't strictly invalid, even if unusual.My workaround is to retrieve the HTML manually, and remove all empty
rel
attributes before passing it to Micrometa.Example:
Not sure if it's worth adding anything to the library to ignore these empty rel attributes? I'd be happy to come up with a PR if so.
Warm regards.
The text was updated successfully, but these errors were encountered: