Skip to content

Instantly share code, notes, and snippets.

View rajtilakjee's full-sized avatar
:octocat:
Imagineering!

Rajtilak Bhattacharjee rajtilakjee

:octocat:
Imagineering!
View GitHub Profile
@HH0718
HH0718 / reddit_pushshift.py
Last active November 18, 2022 19:36
A reddit PushShift API call to get total user comments.
import requests
def get_author_total_comments(**kwargs):
r = requests.get("https://api.pushshift.io/reddit/comment/search/", params=kwargs)
data = r.json()
return data['metadata']['total_results']
if __name__ == "__main__":