Skip to content

Commit

Permalink
scripts: Improve scrape performance
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Mar 20, 2024
1 parent 33eb8b5 commit a5f790f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function main() {
const brawlerNames = brawlerPages.map(brawlerPage => brawlerPage.title);

const previously = new Date();
previously.setDate(previously.getDate() - 14);
previously.setDate(previously.getDate());
const previouslyStr = previously.toISOString().substring(0, 10)

// get ids of starpowers and gadgets
Expand All @@ -44,7 +44,7 @@ async function main() {
"dimensions": ["battle.brawler_dimension", "battle.starpower_dimension"],
"filters": [{
"member": "battle.season_dimension",
"operator": "afterDate",
"operator": "gte",
"values": [previouslyStr]
}, {
"member": "battle.starpower_dimension",
Expand All @@ -62,7 +62,7 @@ async function main() {
"dimensions": ["battle.brawler_dimension", "battle.gadget_dimension"],
"filters": [{
"member": "battle.season_dimension",
"operator": "afterDate",
"operator": "gte",
"values": [previouslyStr]
}, {
"member": "battle.gadget_dimension",
Expand Down

0 comments on commit a5f790f

Please sign in to comment.