Capture username in Medium RSS schema - #243
Merged
Merged
Conversation
The Medium RSS schema captures fullname and image but the username field is left empty. Adding a named-capture group for it from the <channel>'s <link>https://medium.com/@USERNAME</link> 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.
Owner
|
Thanks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Medium RSSschema currently capturesfullname,image, andlatest_activity_at, but leavesusernameempty. The username is sitting right in the channel's<link>element — adding a named-capture group for it.Reproducer (before)
After this patch, the same call also returns
'username': 'blue'.Why this matters
Useful for
--parseflows against a Medium URL where the username has to be discovered from the page content rather than supplied as input. The olderMediumHTML schema (still present in the file, for completeness) already exposedmedium_username— this restores parity for the RSS path.Test