This project automates Bing searches to earn Microsoft Rewards points. It checks for user inactivity and performs searches during idle time. The bot uses the pyautogui library for GUI automation and keyboard library for detecting key presses.
Medium Post :
- Python 3.x
pyautoguikeyboardscheduleopen_edge
Install the required libraries using pip:
pip install -r requirements.txt-
Clone the Repository
git clone <repository-url> cd <repository-directory>
-
Prepare the
words_listModuleEnsure you have a
words_list.pyfile with a list of words to be used for searching. For example:words = ["example", "word", "list", "search", "terms"]
-
Run the Script
Execute the script:
python auto_bing_search.py
- Inactivity Detection: The script detects user inactivity. If the system is idle for 5 seconds, it starts the automated search task.
- Automated Searches: Performs Bing searches using a list of predefined words.
- Safety Exit: Press the
Esckey to stop the bot during inactivity. // Currently not working
auto_bing_search.py: Main script for running the Bing search bot.words_list.py: List of words for the search terms.open_edge.py: Module for opening and closing Microsoft Edge browser (must be implemented).
- Inactivity Checker: Checks for system inactivity using the
GetLastInputInfoWindows API. - Task Function: Automates Bing searches by simulating key presses and mouse clicks.
- Exit Handler: Listens for the
Esckey press to safely terminate the bot.
get_idle_duration(): Returns the idle duration in seconds.check_inactivity(): Checks if the system is inactive for 5 seconds.check_esc_press(): Listens for theEsckey to terminate the bot.task(): Performs automated Bing searches during inactivity.inactiviity_checker(): Scheduler that runs the inactivity check.
inactivity_thread: Runs the inactivity checker.task_thread: Runs the automated search task.
To see the bot in action, run the script and leave the system idle for 5 seconds. The bot will start performing searches automatically. Press Esc to stop the bot.
Feel free to modify the README.md file according to your needs and add any additional information relevant to your project.