anthonydb / pneumatic

pneumatic is a bulk-upload library for DocumentCloud.
MIT License
23 stars 3 forks source link

Requests no longer supports HTTP auth via URL #20

Closed anthonydb closed 4 years ago

anthonydb commented 4 years ago

Passing authentication in via URL in the pattern https://user@example.com:user-password:www.documentcloud.org/api/search.json?q=test is no longer working with the Requests library, which throws the following error:

requests.exceptions.InvalidURL: Failed to parse:

anthonydb commented 4 years ago

Fixed via https://github.com/anthonydb/pneumatic/commit/a78a467fdf64ce798c49ab4184bb988fab413b92

Requests offers an easy solution -- passing credentials in via an auth argument.