Open diogogithub opened 2 years ago
The capitalised domain name is the fallback when the provider name is not found in the code. You can see here the ProviderName detector code: https://github.com/oscarotero/Embed/blob/master/src/Detectors/ProviderName.php#L15
provider_name
key of oEmbed (if exists)og:site_name
, publisher
, etc meta tagsOh... Is there any setting to set the fallback to something like null
representing the absence of value? Otherwise it can be complicated to distinguish between actual findings and this fallback...
You can replace any detector, like this one with other with a different behavior. See this example: https://github.com/oscarotero/Embed#detectors
With
$url = 'https://eportugal.gov.pt/'
the providerName is set asEportugal
instead ofePortugal
. Even though "Eportugal" is not present anywhere in the website. On the other hand, YouTube is returned as "YouTube". For many other websites it seems that the pattern of capitalising only the first letter and having the rest lower case is present.