mirror of
https://github.com/samsonjs/spirit-tracker.git
synced 2026-03-25 09:25:51 +00:00
feat: Craft cellars fixes
This commit is contained in:
parent
2c5ee133a1
commit
4a7d1385b5
1 changed files with 2 additions and 4 deletions
|
|
@ -142,11 +142,9 @@ function cfgNum(v, fallback) {
|
|||
function extractCraftSkuFromProductPageHtml(html) {
|
||||
const s = String(html || "");
|
||||
|
||||
// allow any content between </strong> and <span> (including newlines, other tags)
|
||||
const m =
|
||||
s.match(
|
||||
/<strong>\s*SKU:\s*<\/strong>\s*<span>\s*([^<]{1,80}?)\s*<\/span>/i
|
||||
) ||
|
||||
s.match(/\bSKU:\s*<\/strong>\s*<span>\s*([^<]{1,80}?)\s*<\/span>/i) ||
|
||||
s.match(/<strong>\s*SKU:\s*<\/strong>[\s\S]{0,200}?<span>\s*([^<]{1,80}?)\s*<\/span>/i) ||
|
||||
s.match(/\bSKU:\s*([A-Za-z0-9][A-Za-z0-9\-_/ ]{0,40})/i);
|
||||
|
||||
const raw = m && m[1] ? stripTags(decodeHtml(m[1])) : "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue