Code Monkey home page Code Monkey logo

microsoft-rewards-bot's Introduction

Microsoft-Rewards-Bot

Microsoft Rewards (Bing Rewards) Bot - Completes searches and quizzes , written in Python! ๐Ÿ™Œ

Overview

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!

Features

  • Completes PC search, Edge search, Mobile search via user agents
  • Retrieves top daily searches via Google Trends' API
  • Completes polls, all types of quizzes (multiple choice, click and drag and reorder), and explore dailies
  • Headless mode (Confirmed working on DigitalOcean linux droplet)
  • Supports unlimited accounts via JSON, in randomized order.
  • Randomized search speeds
  • Logs errors and info by default, can log executed commands and search terms by changing the log level to DEBUG
  • Tested and confirmed working for U.S. and U.K. (more to come!)

REQUIREMENTS

  • Python 3.6
  • Requests 2.21.0
  • Selenium 3.14.0
  • Chrome Browser

HOW TO USE

  1. Clone and navigate to repo

  2. Modify ms_rewards_login_dict.json with your account names and passwords, remove .example from filename.

  3. Enter into cmd/terminal/shell: pip install -r requirements.txt

    • This installs dependencies (selenium)
  4. Enter into cmd/terminal/shell: python ms_rewards.py --headless --mobile --pc --quiz

    • enter -h or --help for more instructions
      • --headless is for headless mode
      • --mobile is for mobile search
      • --pc is for pc search
      • --quiz is for quiz search
      • -a or --all is short for mobile, pc, and quiz search
      • --authenticator use Microsoft Authenticator prompts instead of passwords
        • When using Microsoft Authenticator:
    • Script by default will execute mobile, pc, edge, searches, and complete quizzes for all accounts (can change this setting in the .py file)
    • Script by default will run in interactive mode
    • Run time for one account is under 5 minutes, for 100% daily completion
    • If python environment variable is not set, enter /path/to/python/executable ms_rewards.py
  5. For completing points from email links:

    • Modify email_links.txt file with email links.

      • Copy and paste links without surrounding quotes, each on individual line, like such:

          httplink1
          httplink2
          httplink3
        
    • Enter cmd/terminal/shell argument python ms_rewards.py --email

    • Script will be manual, requires key press to continue, as the quizzes are not yet standardized.

  6. Crontab (Optional for automated script daily on linux)

    • Enter in terminal: crontab -e
    • Enter in terminal: 0 12 * * * /path/to/python /path/to/ms_rewards.py --headless --mobile --pc --quiz
      • Can change the time from 12am server time to whenever the MS daily searches reset (~12am PST)
    • Change the paths to the json in the .py file to appropriate path

TO DO

  • Argparse for options:
    • logging
    • custom user agents
  • Rewrite script into class-based code or Organize monolithic code into different py files for maintainability
  • os.environ variables for multiple logins (current account names and passwords are too long)
  • Proxy support
  • Multithreaded mode or seleniumGrid
  • Support for other regions

License

100% free to use and open source. ๐Ÿ™ˆ ๐Ÿ™‰ ๐Ÿ™Š

Versions

2019.04.03

- Added fix for wait_until_visible from .find_element to .find_elements

2019.04.02

- Added adreo00's code for setting log level with argparse

2019.04.01

- Added fix for detecting pcpoints element during point status check
- Removed edge points as the status screen no longer displays them

2019.03.01

- Incorporated ShoGinn's lightning quiz fix
- Fixed .cico quiz close patch
- Added const for logging level

2019.02.02

- Fixed open offer link to target the link

2019.02.01

- Added chromedriver auto-downloading

2019.01.01

- Error handling for 'credits2', function should exit and script should continue to execute.

2019.01

- Migrated to chrome/chromedriver 
    - Immediate improvement in speed and stability over firefox/geckodriver
    - Appears to use less RAM than firefox (suprisingly..)
    - May be possible to run on raspberrypi (rpi has chromedriver)
- Mitigated credits2 error by performing an action before going to search URL

2018.04

- Performance improvements
- Fixed login, now waits until page is fully loaded
- Replaced urllib api call with requests
- Updated get points with chrome extension source, less prone to error (credit to Shoginn for the url!)
- Updated quizzes to log open quiz offers, completed quiz offers, all points
- Modified error catching for alerts, combined with timeoutexception
- Misc fixes

2018.03

- Fixed issue with daily poll IDs changing
- Added check for sign-in prompt after click on a quiz 
- Misc fixes

2018.02

- Added argparse
- Added points from email links
- Added randomized account login order
- Reworked newsapi.org API to google trends
- Fixed logging
- Fixed issue with dropped searches

2018.01

- Initial release
- Basic functionality for completing searches and quizzes.  

Special Thanks

@ShoGinn - for extraordinary assistance in making this project better!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.