Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



How do those handle SSL and user authentication? I skimmed your links but didn't see anything.

Python's urllib2 isn't that bad for the simple stuff shown in your links, but it's a mess when you have to try to log in somewhere. Seeing in the example that logging in is as straightforward as

    requests.get('https://api.github.com', auth=('user', 'pass'))
just blew me away.


Yeah the authentication parts of urllib2 remind me of the horrible 20-letter classes glued together in Java, just the thing I wanted to escape from by using Python. Seeing that I'm trying to make this script interface with a website that uses both cookies and http auth this library seems like a godsend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: