1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

request: only show what request we are getting.

This commit is contained in:
Johan Andersson 2015-09-07 20:13:36 +02:00
parent 467e49b3ad
commit 1057f800b0

View File

@ -35,11 +35,7 @@ class HTTP(Session):
def request(self, method, url, *args, **kwargs):
log.debug("HTTP getting %r", url)
starttime = time.time()
res = Session.request(self, method, url, **kwargs)
spent_time = time.time() - starttime
bps = 8 * len(res.content) / max(spent_time, 0.001)
log.debug("HTTP got %d bytes from %r in %.2fs (= %dbps)", len(res.content), url, spent_time, bps)
return res
def sort_quality(data):