nsapa / fanfictionnet_ff_proxy

fanfictionnet_ff_proxy: an experimental "proxy" for fanfiction.net piloted by FanFicFare
CeCILL Free Software License Agreement v2.1
22 stars 3 forks source link

Downloading of chromedriver should not be necessary any more #16

Closed mcepl closed 1 year ago

mcepl commented 1 year ago

My error is:

fun~/r/fanfictionnet_ff_proxy$ python3 chrome_content.py --verbose --write-log --log-filenam
e /tmp/fanfiction_proxy_log.txt
2023-07-26 08:22:31.620 CEST INFO main fanfictionnet_ff_proxy version 0.5.8 by Nicolas SAPA <nico@byme.at>
2023-07-26 08:22:31.621 CEST INFO main This Alpha software is licensed under CECILL-2.1
2023-07-26 08:22:31.622 CEST INFO main Running on Linux-6.4.4-1-default-x86_64-with-glibc2.37

(cobalt:2): dbind-WARNING **: 08:22:31.852: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
2023-07-26 08:22:32.214 CEST DEBUG main ChromeVersionFinder returned 115 for /home/matej/.local/bin/chromium
2023-07-26 08:22:32.218 CEST DEBUG undetected_chromedriver.patcher getting release number from /LATEST_RELEASE_115
2023-07-26 08:22:32.699 CEST ERROR ProxiedBrowser(init) Downloading chromedriver 115 failed: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/home/matej/archiv/knihovna/repos/fanfictionnet_ff_proxy/chrome_content.py", line 826, in <module>
    driver = ProxiedBrowser(chrome_path, args.verbose, chrome_version)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matej/archiv/knihovna/repos/fanfictionnet_ff_proxy/chrome_content.py", line 225, in __init__
    raise e
  File "/home/matej/archiv/knihovna/repos/fanfictionnet_ff_proxy/chrome_content.py", line 219, in __init__
    self.driver = driver = uc.Chrome(service_log_path=service_log_path,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matej/.local/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 247, in __init__
    self.patcher.auto()
  File "/home/matej/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 158, in auto
    release = self.fetch_release_number()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matej/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 222, in fetch_release_number
    return LooseVersion(urlopen(self.url_repo + path).read().decode())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
fun~/r/fanfictionnet_ff_proxy$ 

When I was looking for the solution, I found https://stackoverflow.com/questions/76724939/there-is-no-such-driver-by-url-https-chromedriver-storage-googleapis-com-lates

mcepl commented 1 year ago

On the other hand (from https://chromedriver.chromium.org/):

Starting with M115 the latest Chrome + ChromeDriver releases per release channel (Stable, Beta, Dev, Canary) are available at the Chrome for Testing availability dashboard. For automated version downloading one can use the convenient JSON endpoints.

mcepl commented 1 year ago

I have no idea what I am talking about, so I won't blame anybody for it.