Xenoveritas / js-timer

JavaScript library for creating countdown timers (or clocks or really anything of that nature)
MIT License
16 stars 6 forks source link

XV event seems to not be added to timers.json #17

Open alyssadev opened 9 months ago

alyssadev commented 9 months ago

I had a brief poke around, my guess would be maybe the news post announcing it isn't in the spot expected, as the event isn't accompanied by a maintenance? The mogtome event shows up though.

yarn install v1.22.21
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning webpack-dev-server > webpack-dev-middleware > memfs@3.6.0: this will be v4
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ npm run build:tools && webpack

> ffxiv-timer@0.2.0 build:tools
> tsc --build tsconfig.tools.json

Found 4 URLs to check.
Pulling http://na.finalfantasyxiv.com/lodestone/news/detail/37556187fb09fd0ae4b9cc4a0433952a805ce30f...
Generated a maintenance timer
Pulling http://na.finalfantasyxiv.com/lodestone/news/detail/32613a1e79540cfbbd938c0820a4465675c32482...
Generated a maintenance timer
Pulling http://na.finalfantasyxiv.com/lodestone/news/detail/dd5226da5fa25c7fe8f114e09b5da0e0d5ad54b5...
Generated a maintenance timer
Pulling http://na.finalfantasyxiv.com/lodestone/news/detail/d55d313a02b4ee573c6e2a39ee230414f2be6c55...
Generated a maintenance timer
Unable to save cache: [Error: ENOENT: no such file or directory, open './build/timer-cache.json'] {
  [stack]: "Error: ENOENT: no such file or directory, open './build/timer-cache.json'",
  [message]: "ENOENT: no such file or directory, open './build/timer-cache.json'",
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: './build/timer-cache.json'
}
Kept 0 timers after removing old timers.
assets by chunk 159 KiB (name: main)
  asset main.js 140 KiB [emitted] (name: main)
  asset main.css 19 KiB [emitted] (name: main)
asset ffxiv_timer.html 1.03 KiB [emitted]
asset timers.json 234 bytes [emitted] [from: web/timers.json] (auxiliary name: main)
Entrypoint main 159 KiB (234 bytes) = main.css 19 KiB main.js 140 KiB 1 auxiliary asset
runtime modules 1.42 KiB 3 modules
cacheable modules 42.5 KiB (javascript) 5.72 KiB (css/mini-extract)
  javascript modules 42.5 KiB
    modules by path ./web/ 26.7 KiB
      ./web/ffxiv_main_debug.ts 975 bytes [built] [code generated]
      ./web/ffxiv_countdown.ts 20.7 KiB [built] [code generated]
      ./web/ffxiv_builtins.ts 5.05 KiB [built] [code generated]
      ./web/ffxiv_timer.scss 50 bytes [built] [code generated]
    modules by path ./src/*.ts 15.8 KiB
      ./src/clock-debug.ts 5.14 KiB [built] [code generated]
      ./src/clock.ts 10.7 KiB [built] [code generated]
  css modules 5.72 KiB
    css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./web/ffxiv_timer.scss 64 bytes [built] [code generated]
    css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./web/ffxiv_timer.scss (1) 5.66 KiB
 [built] [code generated]
./web/timers.json 42 bytes (javascript) 234 bytes (asset) [not cacheable] [built] [code generated]
webpack 5.90.3 compiled successfully in 8055 ms
Done in 24.11s.
Xenoveritas commented 3 months ago

Historically they've been very bad at consistently including the times with events on the Lodestone. In fact, historically, the event times were embedded in images on the "special pages" and not in the HTML at all. Because the XV event dates back to this, you can see that its special page has the start and end times as an image with a blur effect. This one actually uses the alt tag though to embed the time in the HTML, so that's an improvement!

Unfortunately the actual Lodestone post about events (e.g., the current Moonfire Faire) doesn't include the dates in the HTML, which is all this scaper looks at. To get the dates, it would have to also crawl to the special site and check that.

So currently events have to be added manually to the web/timers.json file.