@@ -65,6 +65,25 @@ class ParkedRulesHandler(ExtraRuleHandlerBase):
6565 :class:`~PyFunceble.checker.availability.status.AvailabilityCheckerStatus`
6666 """
6767
68+ PARKED_CONTENT_PATTERNS = (
69+ 'class="parked-domains' ,
70+ "buy-domain" ,
71+ "this domain name is parked" ,
72+ "this domain is parked" ,
73+ "interested in this domain" ,
74+ "really cool domain parked" ,
75+ "domain is for sale" ,
76+ '_trackpageview("/parked/[% parked_type %]/' ,
77+ "| parked domain" ,
78+ "parked banner" ,
79+ "contact with domain owner" ,
80+ "web page is parked" ,
81+ "buy or lease this domain" ,
82+ "parked domain name on " ,
83+ "it is currently parked by the owner" ,
84+ "parked page for" ,
85+ )
86+
6887 def _switch_down_by_cookie (self ) -> "ParkedRulesHandler" :
6988 """
7089 Tries to switch the status to inactive if some special cookies where found.
@@ -75,31 +94,14 @@ def _switch_down_by_cookie(self) -> "ParkedRulesHandler":
7594
7695 return self
7796
78- def _swith_down_by_content (self ) -> "ParkedRulesHandler" :
97+ def _switch_down_by_content (self ) -> "ParkedRulesHandler" :
7998 """
8099 Tries to switch the status to inactive if some relative content were found.
81100 """
82101
83102 content = self .req .text .lower ()
84103
85- if ( # pylint: disable=too-many-boolean-expressions
86- 'class="parked-domains' in content
87- or "buy-domain" in content
88- or "this domain name is parked" in content
89- or "this domain is parked" in content
90- or "interested in this domain" in content
91- or "really cool domain parked" in content
92- or "domain is for sale" in content
93- or '_trackpageview("/parked/[% parked_type %]/' in content
94- or "| parked domain" in content
95- or "parked banner" in content
96- or "contact with domain owner" in content
97- or "web page is parked" in content
98- or "buy or lease this domain" in content
99- or "parked domain name on " in content
100- or "it is currently parked by the owner" in content
101- or "parked page for" in content
102- ):
104+ if any (x in content for x in self .PARKED_CONTENT_PATTERNS ):
103105 self .switch_to_down ()
104106
105107 return self
@@ -120,7 +122,7 @@ def start(self) -> "ParkedRulesHandler":
120122 self ._switch_down_by_cookie ()
121123
122124 if not self .status .status_after_extra_rules :
123- self ._swith_down_by_content ()
125+ self ._switch_down_by_content ()
124126
125127 PyFunceble .facility .Logger .info (
126128 "Finished to check %r against our own set of parked rules." ,
0 commit comments