mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-04-28 07:14:51 +02:00
Fix contact link rating
This commit is contained in:
parent
3ba6940e94
commit
39cba1595a
|
@ -28,6 +28,8 @@ class Rater(AbstractRater):
|
|||
for link in self.check_results['hyperlinks'][url]['links']:
|
||||
if link['text'].lower() == 'kontakt':
|
||||
urls_with_contact_link += 1
|
||||
# make sure we only count 1 for this url
|
||||
break
|
||||
|
||||
if urls_with_contact_link == urls:
|
||||
score = self.max_score
|
||||
|
|
|
@ -37,6 +37,11 @@ class Rater(AbstractRater):
|
|||
continue
|
||||
|
||||
parsed = urlparse(link['href'])
|
||||
if parsed is None:
|
||||
continue
|
||||
if parsed.hostname is None:
|
||||
continue
|
||||
|
||||
if ("facebook.com" in parsed.hostname or
|
||||
"twitter.com" in parsed.hostname or
|
||||
"instagram.com" in parsed.hostname or
|
||||
|
|
Loading…
Reference in a new issue