Automatically answers Buffalo Wild Wings trivia questions using Puppeteer and Google search.
- Install Node.js
- Clone this repository
- Run
npm install
in the repository directory - Create a
cookies.json
file with your BWW account cookies. (I used Fiddler + the mobile app to grab mine, but you could probably use their actual site) - Run
node solve.js
The bot will automatically find questions and answer it to the best of its ability.
- The bot uses puppeteer to open a headless Chrome instance and navigate to the BWW website, logging in with the cookies provided.
- It then navigates to the trivia page and waits for a question to appear.
- Once a question appears, it uses Google search to find the answer to the question.
- It sorts answers based on their count in the Google search results, and then clicks the answer with the highest count.
- It then waits for the next question to appear and repeats the process.
I used Fiddler to find the requests the mobile app makes to allow me to play the game on Desktop (I previously used ADB and OCR, but this is vastly more reliable)
Obviously with more array entries with each cookie to set
[
{
"name": "sessionid",
"value": "aaaabbbbbccccddddeeee",
"domain": ".buffalowildwings.com",
"path": "/",
"expires": -1,
"size": 41,
"httpOnly": false,
"secure": false,
"session": true,
"sameSite": "Lax",
"sameParty": false,
"sourceScheme": "NonSecure",
"sourcePort": 80
}
]