Users report that Pinterest links are not handled — neither pins (https://pinterest.com/pin/<id>, also seen on country subdomains like in.pinterest.com) nor profiles (https://pinterest.com/@<handle>).
Both expose what we need through OG tags plus JSON-LD on the page.
Extracts: for a pin — uploader handle and pin title; for a profile — display name, avatar, and follower count when present.
Note on subdomains: country subdomains (in., ru., www.) must all match the same pattern. Please cover at least one of them in the test.
Where the code goes
- New module
sharetrace/modules/pinterest.py — one function, returns {"data": {...}} or {"error": "..."}.
- Register it in
router.py: URL pattern plus an entry in PARSERS.
- Add output labels in
output.py.
- Unit test in
tests/test_unit_modules.py — copy the shape of TestTelegram, mock the OG / JSON-LD HTML.
- Add a row to the supported-sources table in
README.md.
How you verify it — no credentials, no network
pytest tests/ --ignore=tests/test_integration.py
Unit tests mock requests at the module level, so this runs fully offline. tests/test_integration.py hits the live network and is excluded on purpose.
Done when
Both URL shapes return data, a country subdomain is covered by a test, README rows added.
Out of scope
Board listings, private pins, anything needing login.
Users report that Pinterest links are not handled — neither pins (
https://pinterest.com/pin/<id>, also seen on country subdomains likein.pinterest.com) nor profiles (https://pinterest.com/@<handle>).Both expose what we need through OG tags plus JSON-LD on the page.
Extracts: for a pin — uploader handle and pin title; for a profile — display name, avatar, and follower count when present.
Note on subdomains: country subdomains (
in.,ru.,www.) must all match the same pattern. Please cover at least one of them in the test.Where the code goes
sharetrace/modules/pinterest.py— one function, returns{"data": {...}}or{"error": "..."}.router.py: URL pattern plus an entry inPARSERS.output.py.tests/test_unit_modules.py— copy the shape ofTestTelegram, mock the OG / JSON-LD HTML.README.md.How you verify it — no credentials, no network
Unit tests mock
requestsat the module level, so this runs fully offline.tests/test_integration.pyhits the live network and is excluded on purpose.Done when
Both URL shapes return data, a country subdomain is covered by a test, README rows added.
Out of scope
Board listings, private pins, anything needing login.