From ff61e403df019076630f65cbbf5433c6a180f6d6 Mon Sep 17 00:00:00 2001 From: Raz Ben Yaish Date: Wed, 13 May 2026 06:27:42 +0000 Subject: [PATCH] fix(Medium RSS): capture username from element The Medium RSS schema captures fullname and image but the username field is left empty. Adding a named-capture group for it from the 's https://medium.com/@USERNAME element so the schema produces the same fields the older Medium HTML schema did via medium_username. Useful for --parse runs against a Medium URL, where the username has to be discovered from the page content rather than supplied as input. --- socid_extractor/schemes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socid_extractor/schemes.py b/socid_extractor/schemes.py index 67ec92a..7a33e01 100644 --- a/socid_extractor/schemes.py +++ b/socid_extractor/schemes.py @@ -798,7 +798,7 @@ def _virgool_links(user_row): 'Medium RSS': { 'url_hints': ('medium.com',), 'flags': ['[^\]]+?) on Medium\]\]>[\s\S]*?\s*(?P[^<]+)[\s\S]*?(?P[^<]+)', + 'regex': r'<!\[CDATA\[Stories by (?P<fullname>[^\]]+?) on Medium\]\]>[\s\S]*?https://medium\.com/@(?P[^?/<\s]+)[\s\S]*?\s*(?P[^<]+)[\s\S]*?(?P[^<]+)', 'fields': {}, }, 'Medium': {