Files
dex-scraper/src/main/resources/application.yml
2025-06-26 12:40:51 +02:00

133 lines
3.5 KiB
YAML

quarkus:
http:
port: 8081
scraper:
sources:
- id: konami-official
name: "Konami Official Database"
domain: "yugioh-card.com"
url-patterns:
- "^https://www\\.yugioh-card\\.com/[a-z]{2}/products/.*$"
targets:
card:
root:
type: css
value: "h3:contains(Prefix(es)) + div > ul:nth-child(1) > li"
name:
steps:
- type: "css"
value: "h1.product-title"
- type: "xpath"
value: "//h1[@itemprop='name']"
attack:
steps:
- type: "css"
value: ".atk-value"
- id: ygo-fandom
name: "Yu-Gi-Oh Fandom Wiki"
domain: "yugioh.fandom.com"
url-patterns:
- "^https://yugioh\\.fandom\\.com/wiki/.*$"
targets:
set:
root:
type: css
value: "h3:contains(Prefix(es)) + div > ul:nth-child(1) > li"
id:
steps:
- type: xpath
value: "//li/text()"
transform:
- name: "replace"
parameters: [
" (",
""
]
language:
steps:
- type: xpath
value: "//li/abbr"
- type: xpath
value: "//abbr/@title"
region-key:
steps:
- type: xpath
value: "//li/abbr/text()"
card-print:
multi: true
discriminator:
root:
type: css
value: ".wds-tab__content"
root:
type: css
value: "table > tbody > tr:has(> td)"
id:
steps:
- type: xpath
value: "./td/a[0]"
- type: xpath
value: "./text()"
name:
steps:
- type: xpath
value: "./td/a[1]"
- type: xpath
value: "./text()"
regional-name:
fallback:
default: "N/A"
steps:
- type: xpath
value: "./td[2]"
- type: xpath
value: "./text()"
transform:
- name: "removeInnerQuotes"
parameters: []
rarity:
fallback:
default: "N/A"
steps:
- type: xpath
value: "./td/a[3]"
- type: xpath
value: "./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)"