Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
import requests
import json
def getPushshiftData(after, sub):
url = 'https://api.pushshift.io/reddit/search/submission?&size=1000&after='+str(after)+'&subreddit='+str(sub)
r = requests.get(url)
data = json.loads(r.text)
return data['data']