mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-02 17:14:51 +02:00
Consider site reachable only with status code < 400 (#89)
This commit is contained in:
parent
c03ff21a9c
commit
4524cb5714
|
@ -22,6 +22,11 @@ class Rater(AbstractRater):
|
||||||
for url in self.check_results['url_reachability']:
|
for url in self.check_results['url_reachability']:
|
||||||
if self.check_results['url_reachability'][url]['exception'] is not None:
|
if self.check_results['url_reachability'][url]['exception'] is not None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# only count status 2** or 3** as reachable
|
||||||
|
if self.check_results['url_reachability'][url]['status'] >= 400:
|
||||||
|
continue
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
if count > 0:
|
if count > 0:
|
||||||
|
|
Loading…
Reference in a new issue