Fix nationalmuseum.se URL normalization in artwork DB

This commit is contained in:
Alex Cabal 2024-02-09 16:26:12 -06:00
parent 1bc946f7b5
commit 3f091b0aa8

View file

@ -90,7 +90,7 @@ class Museum extends PropertiesBase{
return $outputUrl;
}
elseif(preg_match('/\bnationalmuseum\.se$/ius', $parsedUrl['host'])){
$exampleUrl = 'https://collection.nationalmuseum.se/eMP/eMuseumPlus?objectId=18217';
$exampleUrl = 'https://collection.nationalmuseum.se/eMP/eMuseumPlus?service=ExternalInterface&module=collection&objectId=18217';
if($parsedUrl['host'] != 'collection.nationalmuseum.se'){
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
@ -110,7 +110,7 @@ class Museum extends PropertiesBase{
throw new Exceptions\InvalidPageScanUrlException($url, $exampleUrl);
}
$outputUrl = 'https://' . $parsedUrl['host'] . $parsedUrl['path'] . '?objectId=' . $vars['objectId'];
$outputUrl = 'https://' . $parsedUrl['host'] . $parsedUrl['path'] . '?service=ExternalInterface&module=collection&objectId=' . $vars['objectId'];
return $outputUrl;
}