mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-06 10:53:41 +02:00
Fix bug
This commit is contained in:
parent
5ad73edf7a
commit
df314c0677
|
@ -42,11 +42,12 @@ class Rater(AbstractRater):
|
||||||
# Calculate score based on the largest value found for a URL.
|
# Calculate score based on the largest value found for a URL.
|
||||||
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
||||||
# for details.
|
# for details.
|
||||||
value = max(payloads_for_urls)
|
if len(payloads_for_urls) > 0:
|
||||||
if value < 994000:
|
value = max(payloads_for_urls)
|
||||||
score = 1
|
if value < 994000:
|
||||||
elif value < 1496000:
|
score = 1
|
||||||
score = .5
|
elif value < 1496000:
|
||||||
|
score = .5
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'type': self.rating_type,
|
'type': self.rating_type,
|
||||||
|
|
|
@ -42,11 +42,12 @@ class Rater(AbstractRater):
|
||||||
# Calculate score based on the largest value found for a URL.
|
# Calculate score based on the largest value found for a URL.
|
||||||
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
||||||
# for details.
|
# for details.
|
||||||
value = max(num_requests_for_urls)
|
if len(num_requests_for_urls) > 0:
|
||||||
if value <= 28:
|
value = max(num_requests_for_urls)
|
||||||
score = 1.0
|
if value <= 28:
|
||||||
elif value <= 38:
|
score = 1.0
|
||||||
score = 0.5
|
elif value <= 38:
|
||||||
|
score = 0.5
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'type': self.rating_type,
|
'type': self.rating_type,
|
||||||
|
|
Loading…
Reference in a new issue