JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
750 stars 161 forks source link

Error downloading from ao3 through a proxy #851

Closed aestheticanine closed 2 years ago

aestheticanine commented 2 years ago

I can't download anything from ao3; I've tried multiple links, public/private stories; I've already set always_login and is_adult to true in personal.ini

Error message is "check_hostname requires server_hostname". Not computer literate but I'm assuming it has something to do with my using a proxy (Shadowsocks); however I can't turn it off or else I won't be able to access ao3 at all (mainland china etc. etc.). Is there a workaround for this that I haven't found?

Screenshot 2022-06-09 033042

calibre, version 5.43.0 ERROR: Unhandled exception: ValueError:check_hostname requires server_hostname calibre 5.43 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (7, 2, 1) && EpubMerge (2, 13, 0) && FanFicFare (4, 13, 0) && Obok DeDRM (7, 2, 1) Traceback (most recent call last): File "calibre_plugins.fanficfare_plugin.fff_plugin", line 667, in get_urls_from_page_menu File "calibre_plugins.fanficfare_plugin.fff_plugin", line 690, in get_urls_from_page File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\geturls.py", line 44, in get_urls_from_page File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\adapters\base_adapter.py", line 440, in get_urls_from_page File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\adapters\adapter_archiveofourownorg.py", line 580, in before_get_urls_from_page File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\requestable.py", line 114, in get_request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\requestable.py", line 106, in get_request_redirected File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\fetcher.py", line 398, in get_request_redirected File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\fetcher.py", line 240, in fetcher_do_request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\fetcher.py", line 136, in fetcher_do_request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\fetcher.py", line 371, in do_request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\fetcher.py", line 476, in request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\requests\sessions.py", line 542, in request File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\requests\sessions.py", line 655, in send File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\requests\adapters.py", line 439, in send File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\connectionpool.py", line 696, in urlopen File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\connectionpool.py", line 964, in _prepare_proxy File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\connection.py", line 359, in connect File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\connection.py", line 500, in _connect_tlsproxy File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\util\ssl.py", line 453, in ssl_wrapsocket File "C:\Users\15070\AppData\Roaming\calibre\plugins\FanFicFare.zip\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl File "ssl.py", line 500, in wrap_socket File "ssl.py", line 997, in _create ValueError: check_hostname requires server_hostname

JimmXinu commented 2 years ago

Not being behind the same proxy, it's very difficult for me to troubleshoot and test this. But here are somethings you can try:

  1. You might try using the FFF setting use_ssl_unverified_context:true, it's an SSL check failing, so that may by-pass it.
  2. FFF does have proxy settings available, but again, I don't have a proxy so I've never tested them myself. They were never documented because they didn't actually work for the user they were added for. In theory, FFF should be using Calibre's proxy settings already. But you can try it like so, only with your proxy settings:
    [defaults]
    http_proxy:http://192.168.42.129:8080
    https_proxy:http://192.168.42.129:8080

At the very least, with AO3 you have the option to download stories directly from the site in various ebook formats.

aestheticanine commented 2 years ago

I've tried both options but neither seem to work. Thanks anyway, guess I'll try my luck with ao3downloader. Cheers!

JimmXinu commented 2 years ago

Okay, sorry it didn't help. I've changed the title a little to reflect the real issue.