pushshift / api

Pushshift API
1.29k stars 107 forks source link

Using escaped comma (%2C) in fields returns empty data? #50

Closed dueringa closed 4 years ago

dueringa commented 4 years ago

I stumbled over this when I was using Python3 requests and could resproduce in the browser. When I use the following URL:

https://api.pushshift.io/reddit/search/submission?fields=author%2Cauthor_fullname%2Ccreated_utc%2Cid%2Cover_18%2Ctitle

or the python script

import requests
import time

params = {
    "fields": "author,author_fullname,created_utc,id,over_18,title"
}

response = requests.get("https://api.pushshift.io/reddit/search/submission", params=params)

I get empty data fields (data=[{},{},{},{},{},{},{},{},{}])

When I use this however, I get the expected data:

https://api.pushshift.io/reddit/search/submission?fields=author,author_fullname,created_utc,id,over_18,title

dueringa commented 4 years ago

Nevermind, duplicate of #26