- Updated packages
- Added timeout after scrolling back to top
- Some Docker improvement thanks to @mgrimace
This commit is contained in:
TheNetsky
2024-05-28 11:38:49 +02:00
parent 9a144b2e60
commit 9b1eed526f
3 changed files with 11 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "microsoft-rewards-script", "name": "microsoft-rewards-script",
"version": "1.4.6", "version": "1.4.7",
"description": "Automatically do tasks for Microsoft Rewards but in TS!", "description": "Automatically do tasks for Microsoft Rewards but in TS!",
"main": "index.js", "main": "index.js",
"engines": { "engines": {
@@ -26,17 +26,17 @@
"author": "Netsky", "author": "Netsky",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/eslint-plugin": "^7.11.0",
"eslint": "^8.56.0", "eslint": "^8.57.0",
"eslint-plugin-modules-newline": "^0.0.6", "eslint-plugin-modules-newline": "^0.0.6",
"typescript": "^5.3.3" "typescript": "^5.4.5"
}, },
"dependencies": { "dependencies": {
"axios": "^1.6.7", "axios": "^1.7.2",
"cheerio": "^1.0.0-rc.12", "cheerio": "^1.0.0-rc.12",
"fingerprint-generator": "^2.1.49", "fingerprint-generator": "^2.1.51",
"fingerprint-injector": "^2.1.49", "fingerprint-injector": "^2.1.51",
"playwright": "^1.42.0", "playwright": "^1.44.1",
"ts-node": "^10.9.2" "ts-node": "^10.9.2"
} }
} }

View File

@@ -140,6 +140,8 @@ export class Search extends Workers {
window.scrollTo(0, 0) window.scrollTo(0, 0)
}) })
await this.bot.utils.wait(500)
const searchBar = '#sb_form_q' const searchBar = '#sb_form_q'
await searchPage.waitForSelector(searchBar, { state: 'visible', timeout: 10_000 }) await searchPage.waitForSelector(searchBar, { state: 'visible', timeout: 10_000 })
await searchPage.click(searchBar) // Focus on the textarea await searchPage.click(searchBar) // Focus on the textarea

1
start.bat Normal file
View File

@@ -0,0 +1 @@
npm run start