Package: bing-rewards
Bing-RewardsA CLI app to perform Bing searchesPlease submit an issue or pull-request if you have an idea for a featureInstallRequirementsUsageConfigFeaturesScript types search queries into the address bar, so must be run in a GUI environment.Use a mobile user agent to get mobile points (--mobile)Configurable number of searches with--count=All files are local, makes no http(s) requestsOnly one external dependance (pynput)Fine tune delay and set browser executable withconfigat$XDG_CONFIG_HOMEor%APPDATA%on WindowsBest Value: gift cards:1,050 points / $1(current rate)Installationpipinstallbing-rewardsWill make the executablebing-rewardsavailable on your PATH.
Look below or try the--helpflag to see detailed usage.Recommended: Use a virtual environment orpipxto avoid poluting your global package path with executable apps. See:pipxpipxinstallbing-rewardsNEW IN 2.0:Now using thepynputbackend with significantly less dependencies than the oldPyAutoGUI. Delete any old virtual enviroment and reinstall to clean up old depdendencies.RequirementsAt least Python 3.10pynputpackage is used to control keypresses and type Bing search URLS.
WARNING: This scriptwilltake control away from the keyboard while running.Pynputperforms key presses. i.e., it does not operate headless or in the background.chromemust be discoverable on the system PATH.Download Google Chrome.
If your chromium based browser has a different name use the--exeflag with an absolute path to the browser executable to use (e.g.--exe=$(which brave-browser)). Also see the"browser-path"key in theconfigfile.To earn points from searching, youmustalso have logged intobing.comwith your Microsoft account at least once, to save cookies.Usagebing-rewards [-h] [--no-window] [-n] [--exe EXE] [-c COUNT] [-d | -m] [--profile "Profile X"]Ex:
Complete mobile and desktop daily points$ bing-rewardsRun 10 searches with mobile user-agent in a new window$ bing-rewards -m -c10$ bing-rewards --mobile --count=10Complete mobile and desktop daily points using specified chrome profile "Profile 1"$ bing-rewards --profile "Profile 1"Launches Chrome as a subprocess with special flags. Tested on Windows 10 and Linux (Ubuntu + Arch), however it should work on Mac OS as well.⚠️Known Issue: No other instance of chrome.exe can be open when the script runs. Chrome prevents different user agents in each window. The script will run, but Chrome will not appear as Edge⚠️Bing has gotten more and more complex with the introduction of the AI tools. Disable as much as you can to make pages load faster. See PR #39 for some modifications you can make to the default search query url parameters that may improve success.ConfigurationRunning with no options will complete mobile and desktop daily search quota.
The following options are available to change the default behavior.
Options supplied at execution time override any config.FlagOption-h,--helpDisplay help and exit-c,--count=NOverride the number of searches to complete-d,--desktopOnly use desktop user agent-m,--mobileOnly use a mobile user agent-n,--dryrunDo everything but type the search query--open-rewardsOpen the rewards page at the end of the run-X,--no-exitDo not close the browser after completing a search--load-delayOverride the time given to Chrome to load in seconds--search-delayOverride the time between searches in seconds--exe EXEThe full path of the Chrome compatible browser executable (Brave and Chrome tested)--nowindowDon't open a new Chrome window, just type the keys--profile "Profile N"Launches chrome using the specified profile. Otherwise use default.--imeTriggers Windows IME to switch to English input by pressing "shift"A config file is also generated in $XDG_CONFIG_HOME or %APPDATA% on Windows
where precise delay modifications can be made. If updates make changes to the default configs, you will have to remove and regenerate the file.Example config~/.config/bing-rewards/config.json{"desktop-count":30,"mobile-count":20,"load-delay":1.5,"search-delay":2,"search-url":"https://www.bing.com/search?FORM=CHROMN&q=","desktop-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37","mobile-agent":"Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile Safari/537.36 Edge/18.19041","browser-path":"C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"}Delay timings are in secondsUser agentsIf interested, the following user agents are passed to Chrome using the--user-agentargument.
These are clearly defined at the top ofbing-rewards.py.Edge Browser on Windows 10 desktop:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37Mobile Edge Browser on Windows 10 phone:Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile Safari/537.36 Edge/18.19041Words:Thekeywordsincluded in this repo where taken from this sitehttps://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/.This script provided the original inspiration but has since been complelty rewritten and expanded.
The original author was contacted for the original source of keywords, but declined to respondDevelopmentThis project usesPoetryfor dependency management and packaging.The easiest way to install python apps is withpipx# Install pipx
pip install pipx
# Install poetry
pipx install poetryThen, fork the repo, clone and install the dependencies withpoetry install.Install the defined pre-commit hooks:poetry run pre-commit installActivate the virtualenv:poetry shellFeel free to open a PR with additional features or fixes