Skip to content

Conversation

@wpower12
Copy link

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.

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.
Copy link
Owner

@JustAnotherArchivist JustAnotherArchivist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use camelCase for variables/attributes (cf. Comment.parentId), so this should be authorId, and likewise on the other lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request module:reddit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants