r/pushshift • u/sexyrexy2185 • Dec 14 '22
I've been getting Response status code 404 since Monday morning. Is this due to the system update? Should I be changing my script someway to access the updated API?
9
Upvotes
4
u/sexyrexy2185 Dec 15 '22 edited Dec 15 '22
UPDATE: I got my script working! (at least for now)
Using
psawin thePushshiftAPI.pyfile I setrate_limit_per_minute=60and replaced all instances of'sort'with'order'.This ended up raising a error with the submission search results where it couldn't find the the submission ids. I solved this by removing the id filter from near the end of the
PushshiftAPI.pyfile.Changing
gen = self._search(return_batch=True, filter='id', **self.payload)togen = self._search(return_batch=True, **self.payload)Thank you everyone for your help.
EDIT: So I'm getting similar results as u/Security_Chief_Odo in that I'm only able to pull data from the last week or so.
EDIT.2: Earliest date I've been able to pull submissions from is 2022-11-03 (YYYY-MM-DD)
2
u/sexyrexy2185 Dec 14 '22
Okay so I tried both bypassing the meta endpoint and switching to pmaw and both options lead me to a 422 response code. Also I've noticed that reveddit.com has been offline since pretty much the same time as I started having trouble. I'm hoping that this will all be resolved in time and it's a symptom of the Server update.
4
u/abelEngineer Dec 14 '22 edited Dec 14 '22
I'm having the same issue as well. I assume it is because of the server migration, but I don't know for sure.
Update: I played around with PSAW's PushshiftAPI class and got it to start up by changing the
/metaendpoint toreddit/comment/searchin thePushshiftAPI.__init__method, and manually assigning arate_limit_per_minuteof 60 (no idea if* that's a good number).I successfully made a manual request to the
reddit/submission/searchandreddit/comment/searchendpoints and I was able to get data back. However, using PSAW'sPushshiftAPI.search_commentsandPushshiftAPI.search_submissionsmethods doesn't seem to work right now because the way that PSAW handles responses and payloads is either outdated (as of this week) or relies on functionality that is temporarily down.3
u/abelEngineer Dec 14 '22
I actually just realized that the PSAW author recommends using a different package called PMAW.
This information is contained in the Readme on Github but is not in the readthedocs page for some reason.