mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.82k stars 968 forks source link

[reddit] oauth error from TERMUX #3947

Closed Kavolc closed 1 year ago

Kavolc commented 1 year ago

How do I run "gallery-dl oauth:reddit" from termux? I got a message "no runnable browser found"

$ gallery-dl oauth:reddit  --verbose
[gallery-dl][debug] Version 1.25.0
[gallery-dl][debug] Python 3.11.0 - Linux-4.19.152-perf-21186317-abA526U1UES2AUD5-aarch64-with-libc
[gallery-dl][debug] requests 2.28.1 - urllib3 1.26.12
[gallery-dl][debug] Configuration Files ['${HOME}/.config/gallery-dl/config.json']
[gallery-dl][debug] Starting DownloadJob for 'oauth:reddit'
[oauth][debug] Using OAuthReddit for 'oauth:reddit'
[oauth][info] Using default reddit client ID (6N9uN0krSDE-ig)
[oauth][error] An unexpected error occurred: Error - could not locate runnable browser. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[oauth][debug]
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gallery_dl/job.py", line 96, in run
    for msg in extractor:
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gallery_dl/extractor/oauth.py", line 323, in items
    self._oauth2_authorization_code_grant(
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gallery_dl/extractor/oauth.py", line 160, in _oauth2_authorization_code_grant
    params = self.open(auth_url, auth_params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gallery_dl/extractor/oauth.py", line 75, in open
    browser = webbrowser.get()
              ^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/webbrowser.py", line 66, in get
    raise Error("could not locate runnable browser")
webbrowser.Error: could not locate runnable browser
Kavolc commented 1 year ago

Edit: adding "-o browser=" gives url to manually paste it on browser.

gallery-dl oauth:reddit -o browser=