mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-17 21:43:59 +00:00
- Switched from Puppeteer to Playwright - Fixed mobile searches not working - Added fingerprint saving in config - Added mobile search retry in config
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import { Page } from 'playwright'
|
|
|
|
import { MicrosoftRewardsBot } from '../index'
|
|
|
|
import { Search } from './activities/Search'
|
|
import { ABC } from './activities/ABC'
|
|
import { Poll } from './activities/Poll'
|
|
import { Quiz } from './activities/Quiz'
|
|
import { ThisOrThat } from './activities/ThisOrThat'
|
|
import { UrlReward } from './activities/UrlReward'
|
|
|
|
import { DashboardData } from '../interface/DashboardData'
|
|
|
|
|
|
export default class Activities {
|
|
private bot: MicrosoftRewardsBot
|
|
|
|
constructor(bot: MicrosoftRewardsBot) {
|
|
this.bot = bot
|
|
}
|
|
|
|
doSearch = async (page: Page, data: DashboardData): Promise<void> => {
|
|
const search = new Search(this.bot)
|
|
await search.doSearch(page, data)
|
|
}
|
|
|
|
doABC = async (page: Page): Promise<void> => {
|
|
const abc = new ABC(this.bot)
|
|
await abc.doABC(page)
|
|
}
|
|
|
|
doPoll = async (page: Page): Promise<void> => {
|
|
const poll = new Poll(this.bot)
|
|
await poll.doPoll(page)
|
|
}
|
|
|
|
doThisOrThat = async (page: Page): Promise<void> => {
|
|
const thisOrThat = new ThisOrThat(this.bot)
|
|
await thisOrThat.doThisOrThat(page)
|
|
}
|
|
|
|
doQuiz = async (page: Page): Promise<void> => {
|
|
const quiz = new Quiz(this.bot)
|
|
await quiz.doQuiz(page)
|
|
}
|
|
|
|
doUrlReward = async (page: Page): Promise<void> => {
|
|
const urlReward = new UrlReward(this.bot)
|
|
await urlReward.doUrlReward(page)
|
|
}
|
|
|
|
} |