auto-bing-rewards 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- auto_bing_rewards-3.3.0/CHANGELOG.md +61 -0
- auto_bing_rewards-3.3.0/LICENSE +21 -0
- auto_bing_rewards-3.3.0/PKG-INFO +211 -0
- auto_bing_rewards-3.3.0/README.md +182 -0
- auto_bing_rewards-3.3.0/bing_rewards/__init__.py +22 -0
- auto_bing_rewards-3.3.0/bing_rewards/__main__.py +10 -0
- auto_bing_rewards-3.3.0/bing_rewards/app.py +16 -0
- auto_bing_rewards-3.3.0/bing_rewards/browser.py +682 -0
- auto_bing_rewards-3.3.0/bing_rewards/cli.py +464 -0
- auto_bing_rewards-3.3.0/bing_rewards/data/keywords.txt +14424 -0
- auto_bing_rewards-3.3.0/bing_rewards/earn/__init__.py +266 -0
- auto_bing_rewards-3.3.0/bing_rewards/earn/client.py +147 -0
- auto_bing_rewards-3.3.0/bing_rewards/earn/dashboard.py +240 -0
- auto_bing_rewards-3.3.0/bing_rewards/earn/models.py +92 -0
- auto_bing_rewards-3.3.0/bing_rewards/log.py +66 -0
- auto_bing_rewards-3.3.0/bing_rewards/login.py +331 -0
- auto_bing_rewards-3.3.0/bing_rewards/options.py +479 -0
- auto_bing_rewards-3.3.0/bing_rewards/report.py +198 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/__init__.py +49 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/api.py +115 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/http.py +447 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/models.py +104 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/oauth.py +218 -0
- auto_bing_rewards-3.3.0/bing_rewards/rewards/parse.py +275 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/__init__.py +54 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/api.py +148 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/plan.py +114 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/pynput.py +103 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/selenium.py +100 -0
- auto_bing_rewards-3.3.0/bing_rewards/search/types.py +49 -0
- auto_bing_rewards-3.3.0/bing_rewards/util.py +40 -0
- auto_bing_rewards-3.3.0/bing_rewards/words.py +73 -0
- auto_bing_rewards-3.3.0/pyproject.toml +86 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [3.3.0](https://github.com/jack-mil/bing-rewards/compare/v3.2.1...v3.3.0) (2025-07-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add a very slight delay between keystrokes for more reliable text input ([#86](https://github.com/jack-mil/bing-rewards/issues/86)) ([b3cd58d](https://github.com/jack-mil/bing-rewards/commit/b3cd58d58aa50084b7baace10120e494af0772dc))
|
|
9
|
+
* add cli arguments to override options from config file (e.g. --no-window) ([#94](https://github.com/jack-mil/bing-rewards/issues/94)) ([08874ff](https://github.com/jack-mil/bing-rewards/commit/08874ff708ab99af83ff3f4278767cecf4418f59))
|
|
10
|
+
* enable color argparse help on python >= 3.14 ([98ad897](https://github.com/jack-mil/bing-rewards/commit/98ad897e4d3121d0fe1b3fb306f453de68a2afdf))
|
|
11
|
+
* more configuration can be set in the config file ([#94](https://github.com/jack-mil/bing-rewards/issues/94)) ([08874ff](https://github.com/jack-mil/bing-rewards/commit/08874ff708ab99af83ff3f4278767cecf4418f59))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* absolute path to script in help output on python >= 3.14 ([98ad897](https://github.com/jack-mil/bing-rewards/commit/98ad897e4d3121d0fe1b3fb306f453de68a2afdf))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Build System
|
|
20
|
+
|
|
21
|
+
* switch to the new uv_build backend for wheels and sdist ([35b6bd7](https://github.com/jack-mil/bing-rewards/commit/35b6bd7905acd5f81b6a8fe5a62e225279d2ee82))
|
|
22
|
+
|
|
23
|
+
## [3.2.1](https://github.com/jack-mil/bing-rewards/compare/v3.2.0...v3.2.1) (2025-06-20)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Changes
|
|
27
|
+
|
|
28
|
+
* removed some potentially objectionable random search terms ([#87](https://github.com/jack-mil/bing-rewards/issues/87)) ([2f08693](https://github.com/jack-mil/bing-rewards/commit/2f08693666c1b6d4ca5e5dcfa064c7a8d8278cb8))
|
|
29
|
+
|
|
30
|
+
## [3.2.0](https://github.com/jack-mil/bing-rewards/compare/v3.1.0...v3.2.0) (2025-06-01)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* enhance browser subprocess termination ([#61](https://github.com/jack-mil/bing-rewards/issues/61)) ([d902ecd](https://github.com/jack-mil/bing-rewards/commit/d902ecd81b68d47e8000ad814b56b5929fe771b0))
|
|
36
|
+
* search-delay option can specify a random range to delay ([#63](https://github.com/jack-mil/bing-rewards/issues/63)) ([fc82c11](https://github.com/jack-mil/bing-rewards/commit/fc82c1116f58dc372994bba52eea93546ac6aa88))
|
|
37
|
+
* skip verifying browser path when --no-window flag is used ([8e98011](https://github.com/jack-mil/bing-rewards/commit/8e9801102b484442e247435bf8b5e36c1096ed30))
|
|
38
|
+
* support and test on Python 3.14 ([b018261](https://github.com/jack-mil/bing-rewards/commit/b018261690fe6ec41f9957e8835f8a9410024373))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **ci:** remove $schema from release-please-manifest ([f3decf5](https://github.com/jack-mil/bing-rewards/commit/f3decf5f051b570bde3de1fde80d315fc2c34027))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Documentation
|
|
47
|
+
|
|
48
|
+
* add UV to install instructions ([64ec334](https://github.com/jack-mil/bing-rewards/commit/64ec33447c34733505fcb1418c0e2700fdcc046f))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Build System
|
|
52
|
+
|
|
53
|
+
* ditch dynamic vcs versioning ([6a4af97](https://github.com/jack-mil/bing-rewards/commit/6a4af97cfabca11c6c34696f74a09606dfe38736))
|
|
54
|
+
* make releaseplease also bump version in uv.lock ([008a9e2](https://github.com/jack-mil/bing-rewards/commit/008a9e2b3522eb572504ee72526b6ab9f65229bd))
|
|
55
|
+
* use UV for project & dep management ([9d65882](https://github.com/jack-mil/bing-rewards/commit/9d658825c4c4fe617b8d224221cbbfc24a4515ec))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Continuous Integration
|
|
59
|
+
|
|
60
|
+
* add release-please workflow ([2fe5143](https://github.com/jack-mil/bing-rewards/commit/2fe514376fab3dbfa34ce4cafc049955320b5f67))
|
|
61
|
+
* Use the ruff action for linting ([e288ec7](https://github.com/jack-mil/bing-rewards/commit/e288ec75df2290e206b97b379153b79c25da99ae))
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 jack-mil
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: auto-bing-rewards
|
|
3
|
+
Version: 3.3.0
|
|
4
|
+
Summary: Perform automated Bing Rewards searches
|
|
5
|
+
Keywords: automation,bing,search,pynput
|
|
6
|
+
Author: jack-mil
|
|
7
|
+
Author-email: jack-mil <62065280+jack-mil@users.noreply.github.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Topic :: Utilities
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Requires-Dist: pynput~=1.8
|
|
21
|
+
Requires-Dist: selenium>=4.49.0
|
|
22
|
+
Requires-Dist: selenium~=4.20 ; extra == 'headless'
|
|
23
|
+
Requires-Python: >=3.10, <3.16
|
|
24
|
+
Project-URL: Source, https://github.com/jack-mil/bing-rewards
|
|
25
|
+
Project-URL: Issues, https://github.com/jack-mil/bing-rewards/issues
|
|
26
|
+
Project-URL: Changelog, https://github.com/jack-mil/bing-rewards/blob/master/CHANGELOG.md
|
|
27
|
+
Provides-Extra: headless
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Bing-Rewards
|
|
31
|
+
|
|
32
|
+
<div align="center">
|
|
33
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/bing-rewards?style=flat-square&label=Python&logo=python&logoColor=yellow">
|
|
34
|
+
<a href="https://pypi.org/p/bing-rewards/"> <img alt="PyPi" src="https://img.shields.io/pypi/v/bing-rewards?label=PyPI&style=flat-square&logo=pypi&logoColor=yellow"></a>
|
|
35
|
+
<a href="https://pypi.org/p/bing-rewards/"> <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/bing-rewards?style=flat-square&label=Downloads&color=orange"></a>
|
|
36
|
+
<br>
|
|
37
|
+
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/bing-rewards?style=flat-square&label=License&color=blueviolet">
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
### A CLI app to perform Bing searches
|
|
41
|
+
Please submit an issue or pull-request if you have an idea for a feature
|
|
42
|
+
|
|
43
|
+
- [Features](#features)
|
|
44
|
+
- [Installation](#installation)
|
|
45
|
+
- [Dependencies](#dependencies)
|
|
46
|
+
- [Usage](#usage)
|
|
47
|
+
- [Options](#options)
|
|
48
|
+
- [Config](#config)
|
|
49
|
+
- [Development](#development)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
* Enter random search queries into your browser *a-la* Auto Hotkey.
|
|
55
|
+
* Use a mobile user agent to get mobile points (`--mobile`)
|
|
56
|
+
* Configurable number of searches with `--count=`
|
|
57
|
+
* Install as self-contained python application with minimal dependencies (`pynput`)
|
|
58
|
+
* Fine tune delay and set browser executable with [config](#configuration) at `$XDG_CONFIG_HOME` or `%APPDATA%` on Windows
|
|
59
|
+
* Not intended as an automated or headless service. Simply assists with what would regularly be a manual task.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
> [!Important]
|
|
63
|
+
> This was originally created in a different age, when Bing & MS was much simpler and less bloated with AI ~~slop~~ tools. Users have reported a wide variety of success on whether this method works at all with the new systems. See some of the pinned or closed issues for reports from others that may improve success. I maintain the *code* in a working state as an excersie in Python packaging, but do *not* personally use the utility, and **cannot guarantee this method will even generate points anymore**!
|
|
64
|
+
|
|
65
|
+
## Installation
|
|
66
|
+
Bing-rewards is a CLI application distributed on PyPI. You can install it however you prefer to manage Python applications on your system. I recommend `pipx` or `uv`.
|
|
67
|
+
|
|
68
|
+
### With [`pipx`](https://pipx.pypa.io/stable/) or `pip`
|
|
69
|
+
```bash
|
|
70
|
+
pipx install bing-rewards
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### With [`uv`](https://docs.astral.sh/uv/getting-started/installation/)
|
|
74
|
+
```sh
|
|
75
|
+
uv tool install bing-rewards
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
These commands will make the executable `bing-rewards` available on your PATH.
|
|
79
|
+
Look below or try the `--help` flag to see detailed usage.
|
|
80
|
+
|
|
81
|
+
> [!Tip]
|
|
82
|
+
> Use a virtual environment or [`pipx`](https://pypa.github.io/pipx/) to avoid polluting your global package space with executable apps. See: [pipx](https://pypa.github.io/pipx/)
|
|
83
|
+
|
|
84
|
+
### Locally
|
|
85
|
+
Clone the repo and install locally. See: [Developing](#development--contribution)
|
|
86
|
+
|
|
87
|
+
## Dependencies
|
|
88
|
+
|
|
89
|
+
- At least Python 3.10
|
|
90
|
+
|
|
91
|
+
- [pynput](https://github.com/moses-palmer/pynput) (installed with package). Used to control keypresses and type Bing search URLS.
|
|
92
|
+
> [!Warning]
|
|
93
|
+
> Bing-Rewards *will* take control away from the keyboard while running. **Pynput** performs key presses. i.e., it does not operate headless or in the background.
|
|
94
|
+
|
|
95
|
+
- `chrome` must be discoverable on the system PATH. [Download Google Chrome](https://www.google.com/intl/en/chrome/).
|
|
96
|
+
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)`).
|
|
97
|
+
See also: `"browser-path"` option in the [config](#configuration) file.
|
|
98
|
+
|
|
99
|
+
- 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.
|
|
100
|
+
- For `--earn`, `--explore-only`, and `--points`, run **`bing-rewards --setup-login`** once. That opens a dedicated Edge profile (not your default Edge User Data), signs you into Rewards, and saves session cookies plus an OAuth Bearer token. Platform `dapi/me` is an API — opening it in a browser tab will show “website is not available”; that is expected.
|
|
101
|
+
|
|
102
|
+
## Usage
|
|
103
|
+
|
|
104
|
+
> [!Tip]
|
|
105
|
+
> Press <kbd>ESC</kbd> to exit early and regain control
|
|
106
|
+
|
|
107
|
+
Complete mobile and desktop daily points
|
|
108
|
+
|
|
109
|
+
`$ bing-rewards`
|
|
110
|
+
|
|
111
|
+
Run 10 searches with mobile user-agent in a new window
|
|
112
|
+
|
|
113
|
+
`$ bing-rewards -m -c10`
|
|
114
|
+
|
|
115
|
+
`$ bing-rewards --mobile --count=10`
|
|
116
|
+
|
|
117
|
+
Complete mobile and desktop daily points using specified Chrome profile "Profile 1"
|
|
118
|
+
|
|
119
|
+
`$ bing-rewards --profile "Profile 1"`
|
|
120
|
+
|
|
121
|
+
Run searches sequentially across multiple Chrome profiles
|
|
122
|
+
|
|
123
|
+
`$ bing-rewards --profile "Default" "Profile 1" "Profile 2"`
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
> [!Warning]
|
|
128
|
+
> 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
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
## Options
|
|
132
|
+
|
|
133
|
+
Running with no options will complete mobile and desktop daily search quota.
|
|
134
|
+
The following options are available to change the default behavior.
|
|
135
|
+
Options supplied at execution time override any config.
|
|
136
|
+
| Flag | Option |
|
|
137
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
138
|
+
| `-h`, `--help` | Display help and exit |
|
|
139
|
+
| `-c`, `--count=N` | Override the number of searches to complete |
|
|
140
|
+
| `-b`, `--bing` | Use this flag if Bing is already your default search engine. Bypasses constructing a bing.com URL |
|
|
141
|
+
| `-d`, `--desktop` | Only use desktop user agent |
|
|
142
|
+
| `-m`, `--mobile` | Only use a mobile user agent |
|
|
143
|
+
| `-n`, `--dryrun` | Do everything but type the search query |
|
|
144
|
+
| `--exe PATH` | The full path of the Chrome compatible browser executable (Brave and Chrome tested) |
|
|
145
|
+
| `--load-delay SEC` | Override the time given to Chrome to load in seconds |
|
|
146
|
+
| `--search-delay MIN[,MAX]` | Set the time between individual searches, in seconds. Can specify a range to get random delays |
|
|
147
|
+
| `--open-rewards` | Open the rewards page at the end of the run |
|
|
148
|
+
| `--nowindow` | Don't open a new Chrome window, just type the keys |
|
|
149
|
+
| `-X`, `--no-exit` | Do not close the browser after completing a search |
|
|
150
|
+
| `--profile` | Run searches using specified Chrome profile(s). Multiple profiles can be specified to run sequentially |
|
|
151
|
+
| `--ime` | Triggers Windows IME to switch to English input by pressing "shift" |
|
|
152
|
+
| `--setup-login` | One-time Edge/Chrome login on a dedicated profile; saves cookies + OAuth token for `--earn` / `--points` (does not reuse default Edge User Data) |
|
|
153
|
+
| `--earn` | Discover and complete earn activities (daily set, explore, polls, quizzes) instead of searches. Needs OAuth token from `--setup-login`; cookies still used for `reportActivity` |
|
|
154
|
+
| `--daily-set-only` | Only complete daily-set quiz/poll items (implies `--earn`) |
|
|
155
|
+
| `--explore-only` | Only complete "Explore on Bing" / "Auf Bing erkunden" cards (implies `--earn`); skips sweepstakes / Weiter verdienen |
|
|
156
|
+
| `--earn-headed` | Run the `--earn` browser visibly (for debugging) |
|
|
157
|
+
|
|
158
|
+
## Config
|
|
159
|
+
A config file is also generated in $XDG_CONFIG_HOME or %APPDATA% on Windows
|
|
160
|
+
where precise delay modifications can be made. If updates make changes to the default configs, you will have to remove and regenerate the file.
|
|
161
|
+
|
|
162
|
+
Example config `~/.config/bing-rewards/config.json`
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"desktop_count": 30,
|
|
166
|
+
"mobile_count": 20,
|
|
167
|
+
"load_delay": 1.5,
|
|
168
|
+
"search_delay": 2,
|
|
169
|
+
"search_url": "https://www.bing.com/search?FORM=CHROMN&q=",
|
|
170
|
+
"desktop_agent": "Mozilla/5.0 ... <snip>",
|
|
171
|
+
"mobile_agent": "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) ... <snip>",
|
|
172
|
+
"browser_path": "C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
Delay timings are in seconds.
|
|
176
|
+
> [!Note]
|
|
177
|
+
> The format has slightly changed in version >= 3.0, so delete and regenerate accordingly.
|
|
178
|
+
|
|
179
|
+
### User agents
|
|
180
|
+
|
|
181
|
+
The default user agents that are passed to the Chrome process are below.
|
|
182
|
+
You may want to experiment with different user agents, or update versions accordingly.
|
|
183
|
+
Alternate user agents can be set in the config file.
|
|
184
|
+
|
|
185
|
+
Edge Browser on Windows 10 desktop (note the ``Edg/`` token — legacy ``Edge/`` is rejected by rewards.bing.com):
|
|
186
|
+
> Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36 Edg/158.0.0.0
|
|
187
|
+
|
|
188
|
+
Mobile Edge Browser on Pixel 6 phone:
|
|
189
|
+
> Mozilla/5.0 (Linux; Android 14; Pixel 6 Build/AP2A.240605.024) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Mobile Safari/537.36 EdgA/158.0.0.0
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
## Words
|
|
193
|
+
The [keywords](https://web.archive.org/web/20220523083250/https://www.myhelpfulguides.com/keywords.txt) included in this repo where taken from this site
|
|
194
|
+
[https://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/](https://web.archive.org/web/20220331033847/https://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/).
|
|
195
|
+
|
|
196
|
+
Their script provided the original inspiration but has since been completely rewritten and expanded.
|
|
197
|
+
The original author was contacted for the source of keywords, but declined to respond
|
|
198
|
+
|
|
199
|
+
## Development
|
|
200
|
+
|
|
201
|
+
This project is managed by the [`uv`](https://docs.astral.sh/uv) toolchain.
|
|
202
|
+
Ensure you have `uv` installed on your system. This is probably available in your package manager,
|
|
203
|
+
or can be installed with `pip` or `pipx`
|
|
204
|
+
|
|
205
|
+
Then, fork the repository on Github and clone to your machine. The first invocation of any `uv` command will install the `bing-rewards` package in editable mode, with the dev dependencies (`ruff` and `pre-commit`) automatically.
|
|
206
|
+
|
|
207
|
+
Install the defined pre-commit hooks: `uv run pre-commit install --install-hooks`
|
|
208
|
+
|
|
209
|
+
Launch bing-rewards in the editable dev environment: `uv run bing-rewards --help`
|
|
210
|
+
|
|
211
|
+
Feel free to open a PR against the `master` branch with additional features or fixes!
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Bing-Rewards
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/bing-rewards?style=flat-square&label=Python&logo=python&logoColor=yellow">
|
|
5
|
+
<a href="https://pypi.org/p/bing-rewards/"> <img alt="PyPi" src="https://img.shields.io/pypi/v/bing-rewards?label=PyPI&style=flat-square&logo=pypi&logoColor=yellow"></a>
|
|
6
|
+
<a href="https://pypi.org/p/bing-rewards/"> <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/bing-rewards?style=flat-square&label=Downloads&color=orange"></a>
|
|
7
|
+
<br>
|
|
8
|
+
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/bing-rewards?style=flat-square&label=License&color=blueviolet">
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
### A CLI app to perform Bing searches
|
|
12
|
+
Please submit an issue or pull-request if you have an idea for a feature
|
|
13
|
+
|
|
14
|
+
- [Features](#features)
|
|
15
|
+
- [Installation](#installation)
|
|
16
|
+
- [Dependencies](#dependencies)
|
|
17
|
+
- [Usage](#usage)
|
|
18
|
+
- [Options](#options)
|
|
19
|
+
- [Config](#config)
|
|
20
|
+
- [Development](#development)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
* Enter random search queries into your browser *a-la* Auto Hotkey.
|
|
26
|
+
* Use a mobile user agent to get mobile points (`--mobile`)
|
|
27
|
+
* Configurable number of searches with `--count=`
|
|
28
|
+
* Install as self-contained python application with minimal dependencies (`pynput`)
|
|
29
|
+
* Fine tune delay and set browser executable with [config](#configuration) at `$XDG_CONFIG_HOME` or `%APPDATA%` on Windows
|
|
30
|
+
* Not intended as an automated or headless service. Simply assists with what would regularly be a manual task.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
> [!Important]
|
|
34
|
+
> This was originally created in a different age, when Bing & MS was much simpler and less bloated with AI ~~slop~~ tools. Users have reported a wide variety of success on whether this method works at all with the new systems. See some of the pinned or closed issues for reports from others that may improve success. I maintain the *code* in a working state as an excersie in Python packaging, but do *not* personally use the utility, and **cannot guarantee this method will even generate points anymore**!
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
Bing-rewards is a CLI application distributed on PyPI. You can install it however you prefer to manage Python applications on your system. I recommend `pipx` or `uv`.
|
|
38
|
+
|
|
39
|
+
### With [`pipx`](https://pipx.pypa.io/stable/) or `pip`
|
|
40
|
+
```bash
|
|
41
|
+
pipx install bing-rewards
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### With [`uv`](https://docs.astral.sh/uv/getting-started/installation/)
|
|
45
|
+
```sh
|
|
46
|
+
uv tool install bing-rewards
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
These commands will make the executable `bing-rewards` available on your PATH.
|
|
50
|
+
Look below or try the `--help` flag to see detailed usage.
|
|
51
|
+
|
|
52
|
+
> [!Tip]
|
|
53
|
+
> Use a virtual environment or [`pipx`](https://pypa.github.io/pipx/) to avoid polluting your global package space with executable apps. See: [pipx](https://pypa.github.io/pipx/)
|
|
54
|
+
|
|
55
|
+
### Locally
|
|
56
|
+
Clone the repo and install locally. See: [Developing](#development--contribution)
|
|
57
|
+
|
|
58
|
+
## Dependencies
|
|
59
|
+
|
|
60
|
+
- At least Python 3.10
|
|
61
|
+
|
|
62
|
+
- [pynput](https://github.com/moses-palmer/pynput) (installed with package). Used to control keypresses and type Bing search URLS.
|
|
63
|
+
> [!Warning]
|
|
64
|
+
> Bing-Rewards *will* take control away from the keyboard while running. **Pynput** performs key presses. i.e., it does not operate headless or in the background.
|
|
65
|
+
|
|
66
|
+
- `chrome` must be discoverable on the system PATH. [Download Google Chrome](https://www.google.com/intl/en/chrome/).
|
|
67
|
+
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)`).
|
|
68
|
+
See also: `"browser-path"` option in the [config](#configuration) file.
|
|
69
|
+
|
|
70
|
+
- 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.
|
|
71
|
+
- For `--earn`, `--explore-only`, and `--points`, run **`bing-rewards --setup-login`** once. That opens a dedicated Edge profile (not your default Edge User Data), signs you into Rewards, and saves session cookies plus an OAuth Bearer token. Platform `dapi/me` is an API — opening it in a browser tab will show “website is not available”; that is expected.
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
> [!Tip]
|
|
76
|
+
> Press <kbd>ESC</kbd> to exit early and regain control
|
|
77
|
+
|
|
78
|
+
Complete mobile and desktop daily points
|
|
79
|
+
|
|
80
|
+
`$ bing-rewards`
|
|
81
|
+
|
|
82
|
+
Run 10 searches with mobile user-agent in a new window
|
|
83
|
+
|
|
84
|
+
`$ bing-rewards -m -c10`
|
|
85
|
+
|
|
86
|
+
`$ bing-rewards --mobile --count=10`
|
|
87
|
+
|
|
88
|
+
Complete mobile and desktop daily points using specified Chrome profile "Profile 1"
|
|
89
|
+
|
|
90
|
+
`$ bing-rewards --profile "Profile 1"`
|
|
91
|
+
|
|
92
|
+
Run searches sequentially across multiple Chrome profiles
|
|
93
|
+
|
|
94
|
+
`$ bing-rewards --profile "Default" "Profile 1" "Profile 2"`
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
> [!Warning]
|
|
99
|
+
> 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
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## Options
|
|
103
|
+
|
|
104
|
+
Running with no options will complete mobile and desktop daily search quota.
|
|
105
|
+
The following options are available to change the default behavior.
|
|
106
|
+
Options supplied at execution time override any config.
|
|
107
|
+
| Flag | Option |
|
|
108
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
109
|
+
| `-h`, `--help` | Display help and exit |
|
|
110
|
+
| `-c`, `--count=N` | Override the number of searches to complete |
|
|
111
|
+
| `-b`, `--bing` | Use this flag if Bing is already your default search engine. Bypasses constructing a bing.com URL |
|
|
112
|
+
| `-d`, `--desktop` | Only use desktop user agent |
|
|
113
|
+
| `-m`, `--mobile` | Only use a mobile user agent |
|
|
114
|
+
| `-n`, `--dryrun` | Do everything but type the search query |
|
|
115
|
+
| `--exe PATH` | The full path of the Chrome compatible browser executable (Brave and Chrome tested) |
|
|
116
|
+
| `--load-delay SEC` | Override the time given to Chrome to load in seconds |
|
|
117
|
+
| `--search-delay MIN[,MAX]` | Set the time between individual searches, in seconds. Can specify a range to get random delays |
|
|
118
|
+
| `--open-rewards` | Open the rewards page at the end of the run |
|
|
119
|
+
| `--nowindow` | Don't open a new Chrome window, just type the keys |
|
|
120
|
+
| `-X`, `--no-exit` | Do not close the browser after completing a search |
|
|
121
|
+
| `--profile` | Run searches using specified Chrome profile(s). Multiple profiles can be specified to run sequentially |
|
|
122
|
+
| `--ime` | Triggers Windows IME to switch to English input by pressing "shift" |
|
|
123
|
+
| `--setup-login` | One-time Edge/Chrome login on a dedicated profile; saves cookies + OAuth token for `--earn` / `--points` (does not reuse default Edge User Data) |
|
|
124
|
+
| `--earn` | Discover and complete earn activities (daily set, explore, polls, quizzes) instead of searches. Needs OAuth token from `--setup-login`; cookies still used for `reportActivity` |
|
|
125
|
+
| `--daily-set-only` | Only complete daily-set quiz/poll items (implies `--earn`) |
|
|
126
|
+
| `--explore-only` | Only complete "Explore on Bing" / "Auf Bing erkunden" cards (implies `--earn`); skips sweepstakes / Weiter verdienen |
|
|
127
|
+
| `--earn-headed` | Run the `--earn` browser visibly (for debugging) |
|
|
128
|
+
|
|
129
|
+
## Config
|
|
130
|
+
A config file is also generated in $XDG_CONFIG_HOME or %APPDATA% on Windows
|
|
131
|
+
where precise delay modifications can be made. If updates make changes to the default configs, you will have to remove and regenerate the file.
|
|
132
|
+
|
|
133
|
+
Example config `~/.config/bing-rewards/config.json`
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"desktop_count": 30,
|
|
137
|
+
"mobile_count": 20,
|
|
138
|
+
"load_delay": 1.5,
|
|
139
|
+
"search_delay": 2,
|
|
140
|
+
"search_url": "https://www.bing.com/search?FORM=CHROMN&q=",
|
|
141
|
+
"desktop_agent": "Mozilla/5.0 ... <snip>",
|
|
142
|
+
"mobile_agent": "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) ... <snip>",
|
|
143
|
+
"browser_path": "C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
Delay timings are in seconds.
|
|
147
|
+
> [!Note]
|
|
148
|
+
> The format has slightly changed in version >= 3.0, so delete and regenerate accordingly.
|
|
149
|
+
|
|
150
|
+
### User agents
|
|
151
|
+
|
|
152
|
+
The default user agents that are passed to the Chrome process are below.
|
|
153
|
+
You may want to experiment with different user agents, or update versions accordingly.
|
|
154
|
+
Alternate user agents can be set in the config file.
|
|
155
|
+
|
|
156
|
+
Edge Browser on Windows 10 desktop (note the ``Edg/`` token — legacy ``Edge/`` is rejected by rewards.bing.com):
|
|
157
|
+
> Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36 Edg/158.0.0.0
|
|
158
|
+
|
|
159
|
+
Mobile Edge Browser on Pixel 6 phone:
|
|
160
|
+
> Mozilla/5.0 (Linux; Android 14; Pixel 6 Build/AP2A.240605.024) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Mobile Safari/537.36 EdgA/158.0.0.0
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## Words
|
|
164
|
+
The [keywords](https://web.archive.org/web/20220523083250/https://www.myhelpfulguides.com/keywords.txt) included in this repo where taken from this site
|
|
165
|
+
[https://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/](https://web.archive.org/web/20220331033847/https://www.myhelpfulguides.com/2018/07/19/bing-rewards-auto-searcher-with-python-3/).
|
|
166
|
+
|
|
167
|
+
Their script provided the original inspiration but has since been completely rewritten and expanded.
|
|
168
|
+
The original author was contacted for the source of keywords, but declined to respond
|
|
169
|
+
|
|
170
|
+
## Development
|
|
171
|
+
|
|
172
|
+
This project is managed by the [`uv`](https://docs.astral.sh/uv) toolchain.
|
|
173
|
+
Ensure you have `uv` installed on your system. This is probably available in your package manager,
|
|
174
|
+
or can be installed with `pip` or `pipx`
|
|
175
|
+
|
|
176
|
+
Then, fork the repository on Github and clone to your machine. The first invocation of any `uv` command will install the `bing-rewards` package in editable mode, with the dev dependencies (`ruff` and `pre-commit`) automatically.
|
|
177
|
+
|
|
178
|
+
Install the defined pre-commit hooks: `uv run pre-commit install --install-hooks`
|
|
179
|
+
|
|
180
|
+
Launch bing-rewards in the editable dev environment: `uv run bing-rewards --help`
|
|
181
|
+
|
|
182
|
+
Feel free to open a PR against the `master` branch with additional features or fixes!
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2020 jack-mil
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
"""Bing Rewards v{VERSION}.
|
|
6
|
+
|
|
7
|
+
Automatically perform Bing searches for Rewards Points!
|
|
8
|
+
Executing 'bing-rewards' with no arguments does {DESKTOP_COUNT} desktop searches
|
|
9
|
+
followed by {MOBILE_COUNT} mobile searches by default.
|
|
10
|
+
|
|
11
|
+
Examples
|
|
12
|
+
--------
|
|
13
|
+
$ bing-search -dc30
|
|
14
|
+
$ bing-search --count=50 --mobile --dryrun
|
|
15
|
+
|
|
16
|
+
Config file: {CONFIG}
|
|
17
|
+
CLI arguments always override the config file.
|
|
18
|
+
Delay timings are in seconds.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
# This package does not export any programmatic API
|
|
22
|
+
# Run as an installed application or as a module
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2020 jack-mil
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
"""Backwards-compatible shim.
|
|
6
|
+
|
|
7
|
+
``bing_rewards.app.main`` is now implemented in :mod:`bing_rewards.cli`.
|
|
8
|
+
This module re-exports it so existing entry points and ``python -m bing_rewards``
|
|
9
|
+
keep working.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from bing_rewards.cli import main
|
|
15
|
+
|
|
16
|
+
__all__ = ['main']
|