Slightly nicer "rank" computer in accept-header
parent
32f9550be5
commit
69a8516cd1
5
morss.py
5
morss.py
|
@ -237,8 +237,9 @@ class SimpleDownload(urllib2.HTTPCookieProcessor):
|
||||||
self.accept = (self.accept,)
|
self.accept = (self.accept,)
|
||||||
|
|
||||||
out = {}
|
out = {}
|
||||||
for (i, group) in enumerate(self.accept):
|
rank = 1.1
|
||||||
rank = 1 - i*0.1
|
for group in self.accept:
|
||||||
|
rank = rank - 0.1
|
||||||
|
|
||||||
if isinstance(group, basestring):
|
if isinstance(group, basestring):
|
||||||
if group in MIMETYPE:
|
if group in MIMETYPE:
|
||||||
|
|
Loading…
Reference in New Issue