Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 0fa69cb

Browse files
committed
added background pyw, minor tweaks, dependency upgrade, readme and changelog update
1 parent d365a75 commit 0fa69cb

File tree

5 files changed

+38
-34
lines changed

5 files changed

+38
-34
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
**2021-03-26**
2+
3+
V2.2.0
4+
5+
- Telegram integration, thanks to @ashanrath.
6+
- Dependency upgraded.
7+
- Code cleanup and bug fixes.
8+
19
**2021-08-01**
210

3-
V2.0.3
11+
V2.1.0
412

513
- Added '--exit-on-finish' command line option.
614
- Fixed a bug in getting quiz links.

README.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ Microsoft Rewards (Bing Rewards) Bot - Completes searches and quizzes, written i
66

77
This program will automatically complete search requests and quizzes on Microsoft Rewards! Search terms are the daily top searches retrieved using Google Trends' API. This bot runs selenium in headless mode for deployment on VPS and for increased performance on local machines. The bot also uses selenium's user agent options to fulfill points for all three platforms (pc, edge browser, mobile). 100% free to use and open source. Code critique/feedback and contributions welcome!
88

9-
## Development
10-
11-
- Completes PC search, Edge search, Mobile search via user agents
12-
- Retrieves top daily searches via Google Trends' API
9+
## Features
10+
- Completes PC search, Edge search and Mobile search
1311
- Completes polls, all types of quizzes (multiple choice, click and drag and reorder), punch cards and explore dailies
14-
- Headless mode (Confirmed working on DigitalOcean linux droplet)
12+
- Retrieves top daily searches via Google Trends' API
13+
- Headless mode
1514
- Supports unlimited accounts via JSON.
1615
- Randomized search speeds
1716
- Logs errors and info by default, can log executed commands and search terms by changing the log level to DEBUG
18-
- Tested and confirmed working for U.K. (more to come!)
1917

18+
## Requirements
2019
- Python [3.9](https://www.python.org/downloads/)
21-
- Requests 2.25.1
22-
- Selenium 3.141.0
20+
- Requests 2.27.1
21+
- Selenium 4.0.0b4
2322
- pyotp 2.6.0
2423
- python-telegram-bot 13.7
2524
- Chrome Browser (Up-to-date)
@@ -31,36 +30,30 @@ This program will automatically complete search requests and quizzes on Microsof
3130
remove `.example` from filename.
3231
3. If your account has 2-factor authentication (2FA) enabled, please follow [README-2FA](README-2FA.md).
3332
4. Enter into cmd/terminal/shell: `python -m pip install -r requirements.txt`
34-
- This installs dependencies (selenium, requests and pytop)
35-
5. Enter into cmd/terminal/shell: `python ms_rewards.py --headless --mobile --pc --quiz`
33+
5. Enter into cmd/terminal/shell: `python ms_rewards.py --headless --mobile --pc --quiz`.
3634
- enter `-h` or `--help` for more instructions
37-
- `--headless` is for headless mode
38-
- `--mobile` is for mobile search
39-
- `--pc` is for pc search
40-
- `--quiz` is for quiz search
41-
- `-a` or `--all` is short for mobile, pc, and quiz search
42-
- `--telegram` is to enable telegram updates. Please follow please follow [README-Telegram](README-Telegram.md).
43-
- Script by default will execute mobile, pc, edge, searches, and complete quizzes for all accounts (can change this setting in the .py file)
44-
- Script by default will run in interactive mode
45-
- If python environment variable is not set, enter `/path/to/python/executable ms_rewards.py`
46-
6. Crontab (Optional for automated script daily on linux)
35+
- `--telegram` is to enable telegram integration. Please follow please follow [README-Telegram](README-Telegram.md).
36+
37+
*Hint: Replace `ms_rewards.py` with `ms_rewards.quiet.pyw` to run the bot in the background without a command window.*
38+
### Optional
39+
- Crontab (automated script daily on linux)
4740
- Enter in terminal: `crontab -e`
4841
- Enter in terminal: `0 12 * * * /path/to/python /path/to/ms_rewards.py --headless --mobile --pc --quiz`
49-
- Can change the time from 12am server time to whenever the MS daily searches reset (~12am PST)
50-
- Change the paths to the json in the .py file to appropriate path
42+
43+
44+
## Troubleshooting
45+
46+
If the bot had worked before but stopped working all of a sudden, this may because I added new dependency. In this case, try this to see if the problem is solved:
47+
48+
- Enter into cmd/terminal/shell: `python -m pip install -r requirements.txt`
5149

5250
## To Do
5351

5452
- High priority:
5553
- Better logging
56-
- More type hint
5754
- Simplify exception handling
58-
- Windows notification
5955
- Low priority:
60-
- Proxy support
61-
- Multithreaded mode or seleniumGrid
6256
- Support for other regions
63-
- Telegram Intergration for reporting bot status/total points.
6457

6558
## License
6659

ms_rewards.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def parse_args():
7474
action='store_true',
7575
dest='telegram_message',
7676
default=False,
77-
help='Activates telegram updates upon completion of searhes.')
77+
help='Sends an update to telegram upon completion.')
7878
_parser = arg_parser.parse_args()
7979
if _parser.all_mode:
8080
_parser.mobile_mode = True
@@ -88,14 +88,13 @@ def get_login_info():
8888
return json.load(f)
8989

9090
def run_bot():
91+
parser = parse_args()
92+
9193
check_python_version()
9294
if os.path.exists("drivers/chromedriver.exe"):
9395
update_driver()
9496
try:
95-
# argparse
96-
parser = parse_args()
9797

98-
# start logging
9998
init_logging(log_level=parser.log_level)
10099
logging.info(msg='--------------------------------------------------')
101100
logging.info(msg='-----------------------New------------------------')

ms_rewards_quiet.pyw

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from ms_rewards import run_bot
2+
3+
if __name__ == '__main__':
4+
run_bot()

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
selenium==3.141.0
2-
requests==2.25.1
1+
selenium==4.0.0b4
2+
requests==2.27.1
33
pyotp==2.6.0
44
python-telegram-bot==13.7

0 commit comments

Comments
 (0)