Please modify `parse_proxy_spec` instead of `https_proxy_from_environment`. Also, regex's not necessary here; just use `rstrip`.
A patch would do. You just fetch the poorly structured HTML, and parse out structured data. Existing code should give you a clue. Beware that (1) we stick to PSL and nothing more (no third party deps); (2) it could be a pretty substantial patch.