Closed rpolve closed 2 years ago
It would seem that only one-word commands are supported when launching the browser. This behaviour forbids the user from using option flags.
Setting the BROWSER var to more than one world silently prevents from opening the result page.
I should be able to use my preferred browser's option flags.
$ BROWSER=lynx ./ddgr -d --show-browser-logs -j wikipedia
[DEBUG] ddgr version 1.9 Python version 3.7.3 [DEBUG] q:wikipedia, region:us-en, page:0, curindex:1, safe:1 [DEBUG] nextParams: [DEBUG] vqd: [DEBUG] proxy:{'https': None} [DEBUG] ua:ddgr/1.9 (textmode; Linux x86_64; 1024x768) [DEBUG] Response body written to '/tmp/ddgr-response-4bg672ji'. [DEBUG] Prev nextParams: [DEBUG] Next nextParams: [DEBUG] VQD: 3-285410119986133957514072786051468542921-256931098327655983058967847324763329434 [DEBUG] Opening https://www.wikipedia.org/ Exiting via interrupt: 2
$ BROWSER='lynx -accept_all_cookies' ./ddgr -d --show-browser-logs -j wikipedia
[DEBUG] ddgr version 1.9 Python version 3.7.3 [DEBUG] q:wikipedia, region:us-en, page:0, curindex:1, safe:1 [DEBUG] nextParams: [DEBUG] vqd: [DEBUG] proxy:{'https': None} [DEBUG] ua:ddgr/1.9 (textmode; Linux x86_64; 1024x768) [DEBUG] Response body written to '/tmp/ddgr-response-773_c8m9'. [DEBUG] Prev nextParams: [DEBUG] Next nextParams: [DEBUG] VQD: 3-285410119986133957514072786051468542921-256931098327655983058967847324763329434 [DEBUG] Opening https://en.wikipedia.org/
I tested both v1.9 and trunk versions.
$ git show --oneline -s
f3580a4 (HEAD -> main, origin/main, origin/HEAD) Fix build break
$ python3 --version
Python 3.7.3
$ lsb_release -a
No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
$ uname -a
Linux raspi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
The env option BROWSER is a standard python thing. Doesn't look like it handles args - https://docs.python.org/3/library/webbrowser.html
BROWSER
description
It would seem that only one-word commands are supported when launching the browser. This behaviour forbids the user from using option flags.
wrong behaviour
Setting the BROWSER var to more than one world silently prevents from opening the result page.
expected behaviour
I should be able to use my preferred browser's option flags.
logs
working
$ BROWSER=lynx ./ddgr -d --show-browser-logs -j wikipedia
:not working
$ BROWSER='lynx -accept_all_cookies' ./ddgr -d --show-browser-logs -j wikipedia
:version
I tested both v1.9 and trunk versions.
$ git show --oneline -s
:system
$ python3 --version
:$ lsb_release -a
:$ uname -a
: