Skip to content

Commit

Permalink
normal mdpi urls
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann authored Nov 2, 2023
1 parent fa8961d commit 5f7d70d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Zotero.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ public static function expand_by_zotero(Template $template, ?string $url = NULL)
if(preg_match('~^(https?://(?:www\.|)nature\.com/articles/[a-zA-Z0-9\.]+)\.pdf(?:|\?.*)$~', $url, $matches)) {
$url = $matches[1]; // remove PDF from Nature urls
}
if(preg_match('~^(https?://(?:www\.|)mdpi\.com/.+)(?:/pdf\-vor|/pdf)$~', $url, $matches)) {
$url = $matches[1];
}

$bad_url = implode('|', ZOTERO_AVOID_REGEX);
if(preg_match("~^https?://(?:www\.|m\.|)(?:" . $bad_url . ")~i", $url)) return FALSE;
Expand Down

0 comments on commit 5f7d70d

Please sign in to comment.