Open KwantumFizzix opened 11 months ago
I'm not able to reproduce, but I don't run on windows. Best guess is that the root cert signing wanderinginn.com is not included in the windows cert store (or urllib.request.urlopen isn't loading the windows cert store).
You can download it (using openssl or simply by going to the website and clicking the padlock icon next to the url, then viewing the cert information and saving the PEM or chain to a local folder) and manually specify the cert path by adding cafile=<full-path-to-cert-file>
to each urlopen call. E.g., if you save the cert as "C:\Users\steph\wanderinginn.cert", you would use:
urlopen(..., cafile=r'"C:\Users\steph\wanderinginn.cert")
Keeping all of the other arguments as-is. I can add this as a pass-through option sometime so you can specify it when calling the script rather than needing to modify the code, but it may be a little while before I get to it.
Hm. or I suppose it may be related to this issue. Going to try to get caught up on open PRs and test w/ the redone table of contents page; you may just want to re-test when that's finished.
edit: scratch that--that ssl issue was only related to images, AFAIK. This is probably just how urllib and windws cert store interact. l went ahead and created a branch that exposes the cafile option to urllib as a new command line flag ('--cafile'), so you can check out that branch and try it if you want. I'm unable to verify the changes at the moment, though, since I'm again banned by the wordpress firewall on wanderinginn website.
I'm not able to reproduce, but I don't run on windows. Best guess is that the root cert signing wanderinginn.com is not included in the windows cert store (or urllib.request.urlopen isn't loading the windows cert store).
You can download it (using openssl or simply by going to the website and clicking the padlock icon next to the url, then viewing the cert information and saving the PEM or chain to a local folder) and manually specify the cert path by adding
cafile=<full-path-to-cert-file>
to each urlopen call. E.g., if you save the cert as "C:\Users\steph\wanderinginn.cert", you would use:urlopen(..., cafile=r'"C:\Users\steph\wanderinginn.cert")
Keeping all of the other arguments as-is. I can add this as a pass-through option sometime so you can specify it when calling the script rather than needing to modify the code, but it may be a little while before I get to it.
can confirm this, had the same issue and fixed it with certifi
import certifi
[...]
- page = urlopen(toc_url)
+ page = urlopen(toc_url, cafile=certifi.where())
Running this command:
C:\...\wandering_inn>python wanderinginn2epub.py --volume 9 --output-by-volume
I get the following output:
I'm pretty new to using github and have been using ChatGPT to get me started so I could definitely (most likely) be missing something obvious.