diff --git a/README.md b/README.md index e4cb097..923563e 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Options supplied at execution time override any config. | `-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 | diff --git a/bing_rewards/__init__.py b/bing_rewards/__init__.py index 09e0528..bb6ac50 100644 --- a/bing_rewards/__init__.py +++ b/bing_rewards/__init__.py @@ -122,7 +122,7 @@ def parse_args(): "-b", "--bing", help="Add this flag if your default search engine is Bing", - action="store_true" + action="store_true", ) # Mutually exclusive options. Only one can be present group = p.add_mutually_exclusive_group() @@ -311,9 +311,9 @@ def search(count, words_gen: Generator, agent, args, config): query = next(words_gen) # If the --bing flag is set, type the query to the address bar directly - if args.bing: + if args.bing: search_url = query - else: + else: # Concatenate url with correct url escape characters search_url = (config.get("search-url") or URL) + quote_plus(query)