bing-rewards


Namebing-rewards JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/jack-mil/bing-rewards
SummaryPerform automated Bing Rewards searches
upload_time2024-03-20 19:29:08
maintainerNone
docs_urlNone
authorjack-mil
requires_python<4.0,>=3.10
licenseMIT
keywords automation bing search pynput points xbox
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bing-Rewards

<div align="center">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/bing-rewards?style=flat-square&label=Python&logo=python&logoColor=yellow">
<a href="https://pypi.org/project/bing-rewards/"> <img alt="PyPi" src="https://img.shields.io/pypi/v/bing-rewards?label=PyPI&style=flat-square&logo=pypi&logoColor=yellow"></a>
<a href="https://pypi.org/project/bing-rewards/"> <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/bing-rewards?style=flat-square&label=Downloads&color=orange"></a>
<br>
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/bing-rewards?style=flat-square&label=License&color=blueviolet">
<a href="https://github.com/psf/black"> <img alt="Formatting" src="https://img.shields.io/badge/Code%20Style-Black-000000?style=flat-square"> </a>

</div>

### A CLI app to perform Bing searches
Please submit an issue or pull-request if you have an idea for a feature

- [Install](#installation)
- [Requirements](#requirements)
- [Usage](#usage)
- [Config](#configuration)

## **Features**

* Script 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) requests
* Only one external dependance (pynput)
* Fine tune delay and set browser executable with [config](#configuration) at `$XDG_CONFIG_HOME` or `%APPDATA%` on Windows
* Best Value: gift cards: **1,050 points / $1** (current rate)
***

## **Installation**
```bash
pip install bing-rewards
```
Will make the executable `bing-rewards` available on your PATH.
Look below or try the `--help` flag to see detailed usage.

**Recommended**: Use a virtual environment or [`pipx`](https://pypa.github.io/pipx/) to avoid poluting your global package path with executable apps. See: [pipx](https://pypa.github.io/pipx/)
```bash
pipx install bing-rewards
```

**NEW IN 2.0:** Now using the `pynput` backend with significantly less dependencies than the old `PyAutoGUI`. Delete any old virtual enviroment and reinstall to clean up old depdendencies.

## **Requirements**

- At least Python 3.10

- [pynput](https://github.com/moses-palmer/pynput) package is used to control keypresses and type Bing search URLS.
WARNING: This script *will* take control away from the keyboard while running. **Pynput** performs key presses. i.e., it does not operate headless or in the background.

- `chrome` must be discoverable on the system PATH. [Download Google Chrome](https://www.google.com/intl/en/chrome/).
If your chromium based browser has a different name use the `--exe` flag with an absolute path to the browser executable to use (e.g. `--exe=$(which brave-browser)`). Also see the `"browser-path"` key in the [config](#configuration) file.

- To earn points from searching, you *must* also have logged into [bing.com](https://www.bing.com) with your Microsoft account at least once, to save cookies.

## **Usage**

#### `bing-rewards [-h] [--no-window] [-n] [--exe EXE] [-c COUNT] [-d | -m] [--profile "Profile X"]`

Ex:
Complete mobile and desktop daily points

`$ bing-rewards`

Run 10 searches with mobile user-agent in a new window

`$ bing-rewards -m -c10`

`$ bing-rewards --mobile --count=10`

Complete 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.


## **Configuration**

Running 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.
| Flag                    | Option                                                                                |
| ----------------------- | --------------------------------------------------------------------------------------|
| `-h`, `--help`          | Display help and exit                                                                 |
| `-c`, `--count=N`       | Override the number of searches to complete                                           |
| `-d`, `--desktop`       | Only use desktop user agent                                                           |
| `-m`, `--mobile`        | Only use a mobile user agent                                                          |
| `-n`, `--dryrun`        | Do everything but type the search query                                               |
| `--bing`                | Use this flag if Bing is already your default search engine. Bypasses constructing a bing.com URL |
| `--open-rewards`        | Open the rewards page at the end of the run                                           |
| `-X`, `--no-exit`       | Do not close the browser after completing a search                                    |
| `--load-delay`          | Override the time given to Chrome to load in seconds                                  |
| `--search-delay`        | Override the time between searches in seconds                                         |
| `--exe EXE`             | The full path of the Chrome compatible browser executable (Brave and Chrome tested)   |
| `--nowindow`            | Don't open a new Chrome window, just type the keys                                    |
| `--profile "Profile N"` | Launches chrome using the specified profile. Otherwise use default.                   |
| `--ime`                 | Triggers 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`
```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 seconds

## User agents

If interested, the following user agents are passed to Chrome using the `--user-agent` argument.
These are clearly defined at the top of `bing-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.37

Mobile 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.19041
***

## Words:
The [keywords](https://www.myhelpfulguides.com/keywords.txt) included in this repo where taken from this site
https://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 respond

## Development

This project uses [Poetry](https://python-poetry.org) for dependency management and packaging.

The easiest way to install python apps is with [pipx](https://pypa.github.io/pipx/)

```
# Install pipx
pip install pipx
# Install poetry
pipx install poetry
```

Then, fork the repo, clone and install the dependencies with `poetry install --with=dev`.

Install the defined pre-commit hooks: `poetry run pre-commit install`

Activate the virtualenv: `poetry shell`

Feel free to open a PR with additional features or fixes

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jack-mil/bing-rewards",
    "name": "bing-rewards",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "automation, bing, search, pynput, points, xbox",
    "author": "jack-mil",
    "author_email": "62065280+jack-mil@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/ba/09bbeb286f2e7cb4acdd56aa222c8973495d2427707cfbfaf815331d7717/bing_rewards-2.3.0.tar.gz",
    "platform": null,
    "description": "# Bing-Rewards\n\n<div align=\"center\">\n<img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/bing-rewards?style=flat-square&label=Python&logo=python&logoColor=yellow\">\n<a href=\"https://pypi.org/project/bing-rewards/\"> <img alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/bing-rewards?label=PyPI&style=flat-square&logo=pypi&logoColor=yellow\"></a>\n<a href=\"https://pypi.org/project/bing-rewards/\"> <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/bing-rewards?style=flat-square&label=Downloads&color=orange\"></a>\n<br>\n<img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/bing-rewards?style=flat-square&label=License&color=blueviolet\">\n<a href=\"https://github.com/psf/black\"> <img alt=\"Formatting\" src=\"https://img.shields.io/badge/Code%20Style-Black-000000?style=flat-square\"> </a>\n\n</div>\n\n### A CLI app to perform Bing searches\nPlease submit an issue or pull-request if you have an idea for a feature\n\n- [Install](#installation)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Config](#configuration)\n\n## **Features**\n\n* Script types search queries into the address bar, so must be run in a GUI environment.\n* Use a mobile user agent to get mobile points (`--mobile`)\n* Configurable number of searches with `--count=`\n* All files are local, makes no http(s) requests\n* Only one external dependance (pynput)\n* Fine tune delay and set browser executable with [config](#configuration) at `$XDG_CONFIG_HOME` or `%APPDATA%` on Windows\n* Best Value: gift cards: **1,050 points / $1** (current rate)\n***\n\n## **Installation**\n```bash\npip install bing-rewards\n```\nWill make the executable `bing-rewards` available on your PATH.\nLook below or try the `--help` flag to see detailed usage.\n\n**Recommended**: Use a virtual environment or [`pipx`](https://pypa.github.io/pipx/) to avoid poluting your global package path with executable apps. See: [pipx](https://pypa.github.io/pipx/)\n```bash\npipx install bing-rewards\n```\n\n**NEW IN 2.0:** Now using the `pynput` backend with significantly less dependencies than the old `PyAutoGUI`. Delete any old virtual enviroment and reinstall to clean up old depdendencies.\n\n## **Requirements**\n\n- At least Python 3.10\n\n- [pynput](https://github.com/moses-palmer/pynput) package is used to control keypresses and type Bing search URLS.\nWARNING: This script *will* take control away from the keyboard while running. **Pynput** performs key presses. i.e., it does not operate headless or in the background.\n\n- `chrome` must be discoverable on the system PATH. [Download Google Chrome](https://www.google.com/intl/en/chrome/).\nIf your chromium based browser has a different name use the `--exe` flag with an absolute path to the browser executable to use (e.g. `--exe=$(which brave-browser)`). Also see the `\"browser-path\"` key in the [config](#configuration) file.\n\n- To earn points from searching, you *must* also have logged into [bing.com](https://www.bing.com) with your Microsoft account at least once, to save cookies.\n\n## **Usage**\n\n#### `bing-rewards [-h] [--no-window] [-n] [--exe EXE] [-c COUNT] [-d | -m] [--profile \"Profile X\"]`\n\nEx:\nComplete mobile and desktop daily points\n\n`$ bing-rewards`\n\nRun 10 searches with mobile user-agent in a new window\n\n`$ bing-rewards -m -c10`\n\n`$ bing-rewards --mobile --count=10`\n\nComplete mobile and desktop daily points using specified chrome profile \"Profile 1\"\n\n`$ bing-rewards --profile \"Profile 1\"`\n\nLaunches Chrome as a subprocess with special flags. Tested on Windows 10 and Linux (Ubuntu + Arch), however it should work on Mac OS as well.\n\n\u26a0\ufe0fKnown 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\n\n\u26a0\ufe0fBing 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.\n\n\n## **Configuration**\n\nRunning with no options will complete mobile and desktop daily search quota.\nThe following options are available to change the default behavior.\nOptions supplied at execution time override any config.\n| Flag                    | Option                                                                                |\n| ----------------------- | --------------------------------------------------------------------------------------|\n| `-h`, `--help`          | Display help and exit                                                                 |\n| `-c`, `--count=N`       | Override the number of searches to complete                                           |\n| `-d`, `--desktop`       | Only use desktop user agent                                                           |\n| `-m`, `--mobile`        | Only use a mobile user agent                                                          |\n| `-n`, `--dryrun`        | Do everything but type the search query                                               |\n| `--bing`                | Use this flag if Bing is already your default search engine. Bypasses constructing a bing.com URL |\n| `--open-rewards`        | Open the rewards page at the end of the run                                           |\n| `-X`, `--no-exit`       | Do not close the browser after completing a search                                    |\n| `--load-delay`          | Override the time given to Chrome to load in seconds                                  |\n| `--search-delay`        | Override the time between searches in seconds                                         |\n| `--exe EXE`             | The full path of the Chrome compatible browser executable (Brave and Chrome tested)   |\n| `--nowindow`            | Don't open a new Chrome window, just type the keys                                    |\n| `--profile \"Profile N\"` | Launches chrome using the specified profile. Otherwise use default.                   |\n| `--ime`                 | Triggers Windows IME to switch to English input by pressing \"shift\"                   |\n\nA config file is also generated in $XDG_CONFIG_HOME or %APPDATA% on Windows\nwhere precise delay modifications can be made. If updates make changes to the default configs, you will have to remove and regenerate the file.\n\nExample config `~/.config/bing-rewards/config.json`\n```json\n{\n    \"desktop-count\": 30,\n    \"mobile-count\": 20,\n    \"load-delay\": 1.5,\n    \"search-delay\": 2,\n    \"search-url\": \"https://www.bing.com/search?FORM=CHROMN&q=\",\n    \"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\",\n    \"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\",\n    \"browser-path\": \"C:\\\\Program Files (x86)\\\\BraveSoftware\\\\Brave-Browser\\\\Application\\\\brave.exe\"\n}\n```\nDelay timings are in seconds\n\n## User agents\n\nIf interested, the following user agents are passed to Chrome using the `--user-agent` argument.\nThese are clearly defined at the top of `bing-rewards.py`.\n\nEdge Browser on Windows 10 desktop:\n> 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\n\nMobile Edge Browser on Windows 10 phone:\n> 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\n***\n\n## Words:\nThe [keywords](https://www.myhelpfulguides.com/keywords.txt) included in this repo where taken from this site\nhttps://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/.\n\nThis script provided the original inspiration but has since been complelty rewritten and expanded.\nThe original author was contacted for the original source of keywords, but declined to respond\n\n## Development\n\nThis project uses [Poetry](https://python-poetry.org) for dependency management and packaging.\n\nThe easiest way to install python apps is with [pipx](https://pypa.github.io/pipx/)\n\n```\n# Install pipx\npip install pipx\n# Install poetry\npipx install poetry\n```\n\nThen, fork the repo, clone and install the dependencies with `poetry install --with=dev`.\n\nInstall the defined pre-commit hooks: `poetry run pre-commit install`\n\nActivate the virtualenv: `poetry shell`\n\nFeel free to open a PR with additional features or fixes\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Perform automated Bing Rewards searches",
    "version": "2.3.0",
    "project_urls": {
        "Homepage": "https://github.com/jack-mil/bing-rewards",
        "Issue Tracker": "https://github.com/jack-mil/bing-rewards/issues",
        "Repository": "https://github.com/jack-mil/bing-rewards"
    },
    "split_keywords": [
        "automation",
        " bing",
        " search",
        " pynput",
        " points",
        " xbox"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07a1a4f3ba408bd886efba3233665b68b8a919adced89cf8ba181170b48703c4",
                "md5": "af2e4cf19049f397159ff2f0ce29f324",
                "sha256": "ab334087a6d698d20ac0971ef1075ece77bf6aae2a455680941ee046e60ff945"
            },
            "downloads": -1,
            "filename": "bing_rewards-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "af2e4cf19049f397159ff2f0ce29f324",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 105323,
            "upload_time": "2024-03-20T19:29:06",
            "upload_time_iso_8601": "2024-03-20T19:29:06.860543Z",
            "url": "https://files.pythonhosted.org/packages/07/a1/a4f3ba408bd886efba3233665b68b8a919adced89cf8ba181170b48703c4/bing_rewards-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eba09bbeb286f2e7cb4acdd56aa222c8973495d2427707cfbfaf815331d7717",
                "md5": "94c7c5ddc3dc61a287d4550adb069af9",
                "sha256": "8a143a086a596bd33dbecc8f4c03002aba9cd3566abaaec3c76cb826b3074570"
            },
            "downloads": -1,
            "filename": "bing_rewards-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "94c7c5ddc3dc61a287d4550adb069af9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 107957,
            "upload_time": "2024-03-20T19:29:08",
            "upload_time_iso_8601": "2024-03-20T19:29:08.897954Z",
            "url": "https://files.pythonhosted.org/packages/2e/ba/09bbeb286f2e7cb4acdd56aa222c8973495d2427707cfbfaf815331d7717/bing_rewards-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-20 19:29:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jack-mil",
    "github_project": "bing-rewards",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bing-rewards"
}
        
Elapsed time: 0.19876s