Refactor extraction logic

Add required models
This commit is contained in:
2025-06-25 13:57:44 +02:00
parent 284723c978
commit ce64f90a66
45 changed files with 586 additions and 141 deletions

View File

@@ -9,8 +9,11 @@ scraper:
domain: "yugioh-card.com"
url-patterns:
- "^https://www\\.yugioh-card\\.com/[a-z]{2}/products/.*$"
selectors:
targets:
card:
root:
type: css
value: "h3:contains(Prefix(es)) + div > ul:nth-child(1) > li"
name:
steps:
- type: "css"
@@ -27,8 +30,9 @@ scraper:
domain: "yugioh.fandom.com"
url-patterns:
- "^https://yugioh\\.fandom\\.com/wiki/.*$"
selectors:
targets:
regional-set:
multi: true
root:
type: css
value: "h3:contains(Prefix(es)) + div > ul:nth-child(1) > li"
@@ -50,4 +54,40 @@ scraper:
region-key:
steps:
- type: xpath
value: "//li/abbr/text()"
value: "//li/abbr/text()"
card:
name:
root:
type: css
value: ".cardTable"
steps:
- type: "xpath"
value: "./tbody/tr[3]/th/text()"
description:
root:
type: css
value: ".cardTable"
steps:
- type: "xpath"
value: "b:contains(Card descriptions)"
type:
root:
type: css
value: ".cardTable"
steps:
- type: "xpath"
value: "b:contains(Card descriptions)"
attack:
root:
type: css
value: ".cardTable"
steps:
- type: "xpath"
value: "b:contains(Card descriptions)"
defense:
root:
type: css
value: ".cardTable"
steps:
- type: "xpath"
value: "b:contains(Card descriptions)"