Returning reddit user IDs for submissions and comments#556
Open
wpower12 wants to merge 2 commits intoJustAnotherArchivist:masterfrom
Open
Returning reddit user IDs for submissions and comments#556wpower12 wants to merge 2 commits intoJustAnotherArchivist:masterfrom
wpower12 wants to merge 2 commits intoJustAnotherArchivist:masterfrom
Conversation
If applied, will update the returned item of the _api_obj_to_item method of the reddit scraper to include the authors full user id, instead of just their username. This is useful to users who track reddit users by these unique IDs across sources.
JustAnotherArchivist
requested changes
Dec 19, 2022
Owner
JustAnotherArchivist
left a comment
There was a problem hiding this comment.
Returning those IDs is indeed a good idea, yeah, thanks!
| selftext: typing.Optional[str] | ||
| subreddit: typing.Optional[str] # E.g. submission 617p51 | ||
| subreddit_id: typing.Optional[str] | ||
| score: int |
There was a problem hiding this comment.
The score is intentionally not included. Pushshift's data is almost always outdated and therefore completely wrong. This also wasn't mentioned in either the commit message or the PR...?
| @dataclasses.dataclass | ||
| class Submission(snscrape.base.Item): | ||
| author: typing.Optional[str] # E.g. submission hf7k6 | ||
| author_id: typing.Optional[str] |
There was a problem hiding this comment.
I use camelCase for variables/attributes (cf. Comment.parentId), so this should be authorId, and likewise on the other lines.
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.
If applied, will update the returned item of the _api_obj_to_item method of the reddit scraper to include the authors full user id, instead of just their username. This is useful to users who track reddit users by these unique IDs across many sources.