Checklist
Description
Maigret version info:
maigret 0.6.6
Socid-extractor: 0.1.1
Aiohttp: 3.13.5
Requests: 2.34.2
Python: 3.12.0
OS: Linux x86_64 (Debian-based VPS)
How to reproduce:
maigret jak2k --site sr.ht
or any full scan (--all-sites) that includes one of the affected sites.
The scan crashes with:
ValueError: Unknown check type '' for site 'sr.ht'
Root cause
Some entries in data.json have neither a checkType field nor an engine. For those, MaigretSite.check_type keeps its class default "" (see maigret/sites.py), and process_site_result() in maigret/checking.py falls through to the final else branch and raises:
raise ValueError(f"Unknown check type '{check_type}' for site '{site.name}'")
Currently 3686 of 6206 entries in data.json lack checkType, but almost all of them use an engine that supplies check_type at runtime, so they work fine. The crash only happens for entries with neither checkType nor an engine. Affected sites I've confirmed in the current DB:
cs.cmu.edu
eggplant.place
neodb.social
sr.ht
taittsuu.com
tilde.club
All six are simple profile-URL sites (url like https://sr.ht/~{username}) with no urlProbe and no presence strings, so a status_code check against the profile URL is the natural behavior.
Proposed fix
In MaigretSite.__init__, normalize an empty check_type to "status_code" (without adding it to stated_fields, so entries that use an engine still get the engine's check_type with the existing precedence logic). I'm happy to open a PR with the fix + a regression test.
Checklist
Description
Maigret version info:
OS: Linux x86_64 (Debian-based VPS)
How to reproduce:
or any full scan (
--all-sites) that includes one of the affected sites.The scan crashes with:
Root cause
Some entries in
data.jsonhave neither acheckTypefield nor anengine. For those,MaigretSite.check_typekeeps its class default""(seemaigret/sites.py), andprocess_site_result()inmaigret/checking.pyfalls through to the finalelsebranch and raises:Currently 3686 of 6206 entries in
data.jsonlackcheckType, but almost all of them use an engine that suppliescheck_typeat runtime, so they work fine. The crash only happens for entries with neithercheckTypenor an engine. Affected sites I've confirmed in the current DB:cs.cmu.edueggplant.placeneodb.socialsr.httaittsuu.comtilde.clubAll six are simple profile-URL sites (
urllikehttps://sr.ht/~{username}) with nourlProbeand no presence strings, so astatus_codecheck against the profile URL is the natural behavior.Proposed fix
In
MaigretSite.__init__, normalize an emptycheck_typeto"status_code"(without adding it tostated_fields, so entries that use an engine still get the engine'scheck_typewith the existing precedence logic). I'm happy to open a PR with the fix + a regression test.