Add raid battles, schedule, & raid hour data for "Event" type events #33
+399
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Introduces
pages/details/event.jsmodule to scrape raid battle and raid schedule data.Also supports "raid hour" detection, as well as bonuses for things such as Mega/Primal/Fusion energy, and Adventure Effect move chance.
Side note:
I know Events can include a lot of different content, so I purposefully didn't try to parse event-wide bonuses, wild spawns, etc, in this PR. I do hope to extend with that functionality, and potentially include some of those soon, if this proves to be an acceptable starting point.
Enhancements
Introduces additional fields within
extraDatafor any"event"type events, which are conditionally filled based on scraped event data & new, additional parsing logic.{ ... "extraData": { "raidSchedule": [], "raidbattles": [], // lowercase for project consistency of this specific key }Partial example:
{ "eventID": "into-the-wild-2025", "name": "Into the Wild", "eventType": "event", ... "extraData": { "raidSchedule": [ { "date": "Monday, November 10", "raidType": "Five-Star Shadow Raids", "bosses": [ { "name": "Lugia", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_249_00.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Ho-Oh", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_250_00.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, ... { "date": "Wednesday, November 12", "raidType": "Five-Star Raids", "bosses": [ { "name": "Necrozma (Dusk Mane)", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm800.fDUSK_MANE.icon.png", "canBeShiny": false, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [ "In addition to encountering Necrozma and receiving the typical raid rewards, Trainers will obtain Solar Fusion Energy or Lunar Fusion Energy from Dusk Mane Necrozma or Dawn Wings Necrozma raids, respectively." ] },Examples
I've included different permutations of similar events for maximum compatibility, as well as including events with lots of details vs no extra details (or no raid spawns at all). Note: I used a local test runner file to scrape old events manually, but used the real
package.jsonnpm commands to test these changes against upcoming/current events.Into the Wild (2025)
GO Wild lead-up event -- daily schedule, daily raid hours, no event-wide raid bosses
JSON Output
{ "eventID": "into-the-wild-2025", "name": "Into the Wild", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/into-the-wild-2025/", "image": "https://cdn.leekduck.com/assets/img/events/article-images/2025/2025-11-10-into-the-wild-2025/into-the-wild-2025.jpg", "start": "2025-11-10T10:00:00.000", "end": "2025-11-14T20:00:00.000", "extraData": { "raidSchedule": [ { "date": "Monday, November 10", "raidType": "Five-Star Shadow Raids", "bosses": [ { "name": "Lugia", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_249_00.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Ho-Oh", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_250_00.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, { "date": "Tuesday, November 11", "raidType": "Five-Star Raids", "bosses": [ { "name": "Tapu Koko", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm785.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Tapu Lele", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm786.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, { "date": "Wednesday, November 12", "raidType": "Five-Star Raids", "bosses": [ { "name": "Necrozma (Dusk Mane)", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm800.fDUSK_MANE.icon.png", "canBeShiny": false, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [ "In addition to encountering Necrozma and receiving the typical raid rewards, Trainers will obtain Solar Fusion Energy or Lunar Fusion Energy from Dusk Mane Necrozma or Dawn Wings Necrozma raids, respectively." ] }, { "date": "Thursday, November 13", "raidType": "Five-Star Raids", "bosses": [ { "name": "Tapu Bulu", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm787.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Tapu Fini", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm788.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, { "date": "Friday, November 14", "raidType": "Five-Star Raids", "bosses": [ { "name": "Necrozma (Dawn Wings)", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm800.fDAWN_WINGS.icon.png", "canBeShiny": false, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [ "In addition to encountering Necrozma and receiving the typical raid rewards, Trainers will obtain Solar Fusion Energy or Lunar Fusion Energy from Dusk Mane Necrozma or Dawn Wings Necrozma raids, respectively." ] } ], "raidbattles": [], "generic": { "hasSpawns": true, "hasFieldResearchTasks": true } } }Into the Wild (2024)
GO Wild lead-up event -- event-wide raid bosses, daily schedule, daily raid hours.
I included this since the page structure was different from 2025, and more dynamic/flexible parsing was necessary.
JSON Output
{ "eventID": "into-the-wild", "name": "Into the Wild", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/into-the-wild/", "image": "...", "start": "...", "end": "...", "extraData": { "raidSchedule": [ { "date": "Tuesday, November 19", "raidType": "Five-Star Raids", "bosses": [ { "name": "Nihilego", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm793.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, { "date": "Wednesday, November 20", "raidType": "Five-Star Raids", "bosses": [ { "name": "Tapu Koko", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm785.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [] }, { "date": "Thursday, November 21", "raidType": "Five-Star Raids", "bosses": [ { "name": "Origin Forme Dialga", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm483.fORIGIN.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [ "Origin Forme Dialga and Origin Forme Palkia caught after raids during this event will have a chance of knowing their signature Adventure Effect moves." ] }, { "date": "Friday, November 22", "raidType": "Five-Star Raids", "bosses": [ { "name": "Origin Forme Palkia", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm484.fORIGIN.icon.png", "canBeShiny": true, "tier": "Tier 5" } ], "hasRaidHour": true, "raidHourTime": "6:00 p.m. to 7:00 p.m. local time", "bonuses": [ "Origin Forme Dialga and Origin Forme Palkia caught after raids during this event will have a chance of knowing their signature Adventure Effect moves." ] } ], "raidbattles": [ { "name": "Weepinbell", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_070_00.png", "canBeShiny": false, "tier": "Tier 3" }, { "name": "Haunter", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_093_00.png", "canBeShiny": false, "tier": "Tier 3" }, { "name": "Flaaffy", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_180_00.png", "canBeShiny": false, "tier": "Tier 3" }, { "name": "Charjabug", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm737.icon.png", "canBeShiny": false, "tier": "Tier 3" } ] } }Enchanted Hallow (2025)
Simpler event, no day-specific schedule, no specific raid hours
JSON output
{ "eventID": "enchanted-hollow-2025", "name": "Enchanted Hollow", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/enchanted-hollow-2025/", "image": "https://cdn.leekduck.com/assets/img/events/article-images/2025/2025-11-04-enchanted-hollow-2025/enchanted-hollow-2025.jpg", "start": "2025-11-04T10:00:00.000", "end": "2025-11-09T20:00:00.000", "extraData": { "raidSchedule": [], "raidbattles": [ { "name": "Paras", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_046_00.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Stantler", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_234_00.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Tarountula", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/poke_capture_0917_000_mf_n_00000000_f_n.png", "canBeShiny": false, "tier": "Tier 1" }, { "name": "Leavanny", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_542_00.png", "canBeShiny": false, "tier": "Tier 3" }, { "name": "Scolipede", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pokemon_icon_545_00.png", "canBeShiny": false, "tier": "Tier 3" }, { "name": "Drampa", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm780.icon.png", "canBeShiny": true, "tier": "Tier 3" } ], "generic": { "hasSpawns": true, "hasFieldResearchTasks": false } } }GO Fest - Global (2025)
Daily raid spawns, daily raid hours
JSON Output
{ "eventID": "pokemon-go-fest-2025-global", "name": "Pokemon GO Fest 2025 Global", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/pokemon-go-fest-2025-global/", "image": "...", "start": "...", "end": "...", "extraData": { "raidSchedule": [ { "date": "Saturday", "raidType": "5-Star Raids", "bosses": [ { "name": "Zamazenta (Crowned Shield)", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm889.fCROWNED_SHIELD.icon.png", "canBeShiny": false, "tier": "Tier 5" } ], "hasRaidHour": false, "raidHourTime": null, "bonuses": [] }, { "date": "Sunday", "raidType": "5-Star Raids", "bosses": [ { "name": "Zacian (Crowned Sword)", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm888.fCROWNED_SWORD.icon.png", "canBeShiny": false, "tier": "Tier 5" } ], "hasRaidHour": false, "raidHourTime": null, "bonuses": [] } ], "raidbattles": [ { "name": "Dapper Pikachu with red accents", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm25.fGOFEST_2025_GOGGLES_RED.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Dapper Pikachu with blue accents", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm25.fGOFEST_2025_GOGGLES_BLUE.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Dapper Pikachu with yellow accents", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm25.fGOFEST_2025_GOGGLES_YELLOW.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Frigibax", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm996.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Train Conductor Falinks", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm870.fGOFEST_2025_TRAIN_CONDUCTOR.icon.png", "canBeShiny": true, "tier": "Tier 3" } ] } }GO Fest - Global (2024)
Event-wide raid bosses, but no daily schedule/raid hours.
I included this since the page structure was different from 2025, and more dynamic/flexible parsing was necessary.
JSON Output
{ "eventID": "pokemon-go-fest-2024-global", "name": "Pokemon GO Fest 2024 Global", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/pokemon-go-fest-2024-global/", "image": "...", "start": "...", "end": "...", "extraData": { "raidSchedule": [], "raidbattles": [ { "name": "Moon Crown Pikachu", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm25.fGOFEST_2024_MTIARA.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Sun Crown Pikachu", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm25.fGOFEST_2024_STIARA.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Jangmo-o", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm782.icon.png", "canBeShiny": true, "tier": "Tier 1" }, { "name": "Day Scarf Espeon", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm196.fGOFEST_2024_SSCARF.icon.png", "canBeShiny": true, "tier": "Tier 3" }, { "name": "Night Scarf Umbreon", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm197.fGOFEST_2024_MSCARF.icon.png", "canBeShiny": true, "tier": "Tier 3" }, { "name": "Nihilego", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm793.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Buzzwole", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm794.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Pheromosa", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm795.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Xurkitree", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm796.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Celesteela", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm797.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Kartana", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm798.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Guzzlord", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm799.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Necrozma", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm800.icon.png", "canBeShiny": true, "tier": "Tier 5" }, { "name": "Stakataka", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm805.icon.png", "canBeShiny": false, "tier": "Tier 5" }, { "name": "Blacephalon", "image": "https://cdn.leekduck.com/assets/img/pokemon_icons/pm806.icon.png", "canBeShiny": false, "tier": "Tier 5" } ] } }High Voltage (2025)
Future event with no raid spawn data (yet)
JSON Output
{ "eventID": "high-voltage-2025", "name": "High Voltage", "eventType": "event", "heading": "Event", "link": "https://leekduck.com/events/high-voltage-2025/", "image": "https://cdn.leekduck.com/assets/img/events/events-default-img.jpg", "start": "2025-11-18T10:00:00.000", "end": "2025-11-22T20:00:00.000", "extraData": { "raidSchedule": [], "raidbattles": [], "generic": { "hasSpawns": false, "hasFieldResearchTasks": false } } }