From 69a8516cd1a50da3676006406913bf32767c9645 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 8 Jan 2014 01:36:31 +0100 Subject: [PATCH] Slightly nicer "rank" computer in accept-header --- morss.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/morss.py b/morss.py index 952fb4e..6f116ab 100644 --- a/morss.py +++ b/morss.py @@ -237,8 +237,9 @@ class SimpleDownload(urllib2.HTTPCookieProcessor): self.accept = (self.accept,) out = {} - for (i, group) in enumerate(self.accept): - rank = 1 - i*0.1 + rank = 1.1 + for group in self.accept: + rank = rank - 0.1 if isinstance(group, basestring): if group in MIMETYPE: