Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[modules/urlutils] Use requests lib for http requests, instead of urllib #20

Open
StarlitGhost opened this issue Jul 6, 2014 · 5 comments

Comments

@StarlitGhost
Copy link
Contributor

http://docs.python-requests.org/en/latest/

It looks much nicer to use.
The only reason I haven't for PyMoronBot is that so much existing code would have to change.

@HubbeKing
Copy link
Member

This. Yes. All of my yes.

@HubbeKing
Copy link
Member

We'd have to redo the urlutils module, but that's not that much work. Should become simpler too. Also that module should have a method for posting stuff to paste.ee, IMO.

@Heufneutje
Copy link
Member

Posting stuff to a pastebin has nothing to do with URL loading. It should be its own module. Other than that, that request library does look nice. Should be easy to change the url loading module to use it.

@StarlitGhost
Copy link
Contributor Author

Well, I implemented these changes in af71d0c.

Exception handling still needs some work for better log messages though, it was getting late last night so I didn't check out what the exceptions contain. Once that's done this can be closed.

@Heufneutje
Copy link
Member

Keeping this open. Most likely we will be using this library for the 2.0 module as well.

@Heufneutje Heufneutje modified the milestones: 2.0, 0.6 Jul 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants