Skip to content

Commit

Permalink
More archive url types
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann authored Dec 24, 2024
1 parent f2d7df5 commit fd08684
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Zotero.php
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ public static function find_indentifiers_in_urls(Template $template, ?string $ur
return true;
}
/// THIS MUST BE LAST
} elseif (($template->has('chapterurl') || $template->has('chapter-url') || $template->has('url') || ($url_type === 'url') || ($url_type === 'chapterurl') || ($url_type === 'chapter-url')) && preg_match("~^https?://web\.archive\.org/web/\d{14}/(https?://.*)$~", $url, $match) && $template->blank(['archiveurl', 'archive-url'])) {
} elseif (($template->has('chapterurl') || $template->has('chapter-url') || $template->has('url') || ($url_type === 'url') || ($url_type === 'chapterurl') || ($url_type === 'chapter-url')) && preg_match("~^https?://web\.archive\.org/web/\d{14}(?:|fw_)/(https?://.*)$~", $url, $match) && $template->blank(['archiveurl', 'archive-url'])) {
if (is_null($url_sent)) {
quietly('report_modification', 'Extracting URL from archive');
$template->set($url_type, $match[1]);
Expand Down

0 comments on commit fd08684

Please sign in to comment.