Development
Frequently asked questions
Where can I see the supported site list?
- Human-readable:
sites.md - Machine-readable:
maigret/resources/data.json
The Markdown list is generated automatically from the JSON database.
Which check methods are supported?
checkType values in data.json describe how Maigret verifies accounts:
message— look forpresenceStrsand ensure none of theabsenceStrsappear.status_code— require a successful HTTP status.response_url— confirm there is no redirect and the response status is 2xx.
Implementation details live in checking.py.
Test setup
Use Python 3.10 for local development.
poetry install --with dev
# Static checks
make lint
# Auto-format
make format
# Run tests with coverage report
make test
open htmlcov/index.html
# Inspect startup performance
make speedFixing false positives
Enable the Git hook that updates statistics:
git config --local core.hooksPath .githooks/.Identify the problematic site (use a random username such as
laiuhi3h4gi3u4hgtor the Telegram bot).Inspect the live profile page:
- If the service is gone, remove it from
data.json. - If the layout changed, update
checkType,presenceStrs, orabsenceStrs. - If authentication is required, set
disabled: true.
- If the service is gone, remove it from
Update the entry manually or run the automatic analyser:
maigret --submit https://my.mail.ru/bk/alexTo disable checks quickly, run:
maigret --self-check --site My.Mail.ru@bk.ruDebug responses with:
maigret soxoj --site My.Mail.ru@bk.ru -d 2> response.txt
Helpful fields in data.json:
engine— predefined behaviour for known platforms (forums, etc.).headers— extra headers to send.requestHeadOnly— use HEAD requests when possible.regexCheck— validate usernames with regular expressions.
Activation mechanism
Some sites require runtime activation (cookies, JWT tokens, etc.). For example, the Vimeo entry triggers a function that fetches a fresh token when a “Something strange occurred” marker appears. The sequence is:
- A request to
urlProbefails with a known error message. - The activation handler defined in
activation.pyruns. - The handler obtains a new token and updates the in-memory headers.
- The next retry succeeds with the refreshed credentials.
See the Vimeo implementation in the source for a complete pattern.
Releasing a new version
Maintainer permissions are required. Contact @soxoj for access.
- Create a release branch with the next version number (increment the patch component unless there are breaking changes).
- Update the version in:
pyproject.tomlmaigret/__version__.pydocs/source/conf.pysnapcraft.yaml
- Update the changelog.
- Open a GitHub release — the CI pipeline will publish the package to PyPI automatically.
Example branch: https://github.com/soxoj/maigret/commit/e520418f6a25d7edacde2d73b41a8ae7c80ddf39
Example release tag: https://github.com/soxoj/maigret/releases/tag/v0.4.1