rembo10/headphones — pull request #1525 by basilfx (2014-04-06 23:46:39+00:00)
Title: Move from urllib to requests

This is the big pull request I mentioned in #1524.

[Requests](python-requests.org) is awesome! I ported a lot of code to `requests`, since it saves a lot of troubles and does a lot of work for you, including gzip handling and authentication. Together with this port, I improved a lot of code. I put most focus on deduplicating code and introduced `request.py` to realize most of it. It does the error checking and more, saving a lot of lines (`searcher.py` went down from 1578 to 1338). Since I don't have access to rutracker, waffles or what.cd, I cannot tell if it is fault proof. However, I did check `git diff` for any problems.