Mercurial > silorider
changeset 62:947bd8643e12
Upgrade webmention silo to new API
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 28 Oct 2023 13:06:34 -0700 |
parents | 91dea4fe31ec |
children | c4dbbbb4990a |
files | silorider/silos/webmention.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/silorider/silos/webmention.py Sat Oct 28 11:57:36 2023 -0700 +++ b/silorider/silos/webmention.py Sat Oct 28 13:06:34 2023 -0700 @@ -2,6 +2,7 @@ import ronkyuu from .base import Silo from ..config import has_lxml +from ..format import CardInfo logger = logging.getLogger(__name__) @@ -18,8 +19,11 @@ def authenticate(self, ctx): logger.info("Webmention silo doesn't require authentication.") - def postEntry(self, entry, ctx): - source_url = entry.url + def getEntryCard(self, entry, ctx): + return CardInfo(entry, "", None) + + def postEntry(self, entry_card, media_ids, ctx): + source_url = entry_card.entry.url logger.debug("Finding mentions in: %s" % source_url) refs = ronkyuu.findMentions(source_url) for r in refs.get('refs', []):