Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion psaw/PushshiftAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def _add_nec_args(self, payload):
payload['metadata'] = 'true'
if 'sort' not in payload:
# Getting weird results if this is not made explicit. Unclear why.
payload['sort'] = 'desc'
if 'after' in payload:
payload['sort'] = 'asc'
else:
payload['sort'] = 'desc'
if 'filter' in payload: #and payload.get('created_utc', None) is None:
if not isinstance(payload['filter'], list):
if isinstance(payload['filter'], str):
Expand Down