Skip to content

Commit c47a673

Browse files
committed
Merge branch 'foreign-affairs-spirillen-rules-squarespace.com' into dev
2 parents d43ba86 + d88ff7a commit c47a673

File tree

1 file changed

+25
-1
lines changed
  • PyFunceble/checker/availability/extras

1 file changed

+25
-1
lines changed

PyFunceble/checker/availability/extras/rules.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,16 @@ def __init__(self, status: Optional[AvailabilityCheckerStatus] = None) -> None:
9191
r"\.github\.io$": [(self.switch_to_down_if_status_code, 404)],
9292
r"\.glitchz\.me$": [(self.switch_to_down_if_status_code, 403)],
9393
r"\.godaddysites\.com$": [(self.switch_to_down_if_status_code, 404)],
94-
r"\.hpg.com.br$": [(self.switch_to_down_if_status_code, 404)],
94+
r"\.hpg\.com\.br$": [(self.switch_to_down_if_status_code, 404)],
95+
r"^heylink\.me$": [(self.switch_to_down_if_status_code, 410)],
96+
r"^heyl\.ink$": [(self.switch_to_down_if_status_code, 410)],
9597
r"\.imgur\.com$": [self.handle_imgur_dot_com],
9698
r"\.liveadvert\.com$": [(self.switch_to_down_if_status_code, 404)],
9799
r"\.myhuaweicloudz\.com$": [(self.switch_to_down_if_status_code, 403)],
98100
r"\.skyrock\.com$": [(self.switch_to_down_if_status_code, 404)],
101+
r"\.squarespace.com$": [(self.switch_to_down_if_status_code, 404),
102+
self.handle_squarespace_com,
103+
],
99104
r"\.sz.id$": [(self.switch_to_down_if_status_code, 302)],
100105
r"\.translate\.goog$": [(self.switch_to_down_if_status_code, 403)],
101106
r"\.tumblr\.com$": [(self.switch_to_down_if_status_code, 404)],
@@ -260,6 +265,25 @@ def handle_vercel_dot_app(self) -> "ExtraRulesHandler":
260265

261266
return self
262267

268+
def handle_squarespace_com(self) -> "ExtraRulesHandler":
269+
"""
270+
Handles the :code:`wordpress.com` case.
271+
272+
.. warning::
273+
This method assume that we know that we are handling a blogspot domain.
274+
"""
275+
276+
regex_squarespace = [r"This site has been deleted by the owner\."]
277+
278+
self.do_on_body_match(
279+
self.req_url,
280+
regex_squarespace,
281+
method=self.switch_to_down,
282+
allow_redirects=True,
283+
)
284+
285+
return self
286+
263287
def __handle_active2inactive(self) -> "ExtraRulesHandler":
264288
"""
265289
Handles the status deescalation.

0 commit comments

Comments
 (0)