feat(loldle): weekly scraper for champion data from loldle.net

Pulls canonical game fields (gender, positions, range_type, regions,
release_date) from loldle.net's JS bundle and merges with ddragon
championFull for display metadata (title, resource, genre, skinCount,
image). Opens a PR weekly via GitHub Actions (Mon 06:00 UTC).
This commit is contained in:
2026-04-22 13:14:12 +07:00
parent 260a9c54fe
commit dd38e39c4e
3 changed files with 224 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
name: scrape-loldle-data
# Rebuilds src/modules/loldle/champions.json every Monday 06:00 UTC by
# scraping loldle.net's JS bundle + merging ddragon championFull.
# Opens a PR if the output changed. Manually triggerable from Actions tab.
#
# Note: the bundled data is shipped with the Worker — the change only takes
# effect after `npm run deploy` is run on the updated main branch.
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
- name: Scrape loldle.net
run: npm run scrape:loldle-data
- name: Open PR if data changed
uses: peter-evans/create-pull-request@v7
with:
branch: data/loldle-weekly-refresh
delete-branch: true
commit-message: "data: weekly loldle.net champion refresh"
title: "data: weekly loldle.net champion refresh"
body: |
Automated weekly refresh of `src/modules/loldle/champions.json`
from loldle.net + ddragon championFull.
Fields sourced from loldle.net: `gender`, `attackType`, `lane`,
`region`, `releaseDate`. Display fields (`title`, `resource`,
`genre`, `skinCount`, `image`) come from ddragon.
Review the diff, merge, then run `npm run deploy` to ship.
add-paths: |
src/modules/loldle/champions.json
src/modules/loldle/champions-data.js