Ensured sort is always explicit to fix some new unusual behavior.

This commit is contained in:
David Marx
2018-08-06 01:47:16 -07:00
parent 4e7731f3a4
commit 891af80a31
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ Change Log
x.x.x (????/??/??)
------------------
* Fixed (added?) `aggs` support.
* Fixed `aggs` support.
* If an aggs parameter is provided to a search method, it will be returned as the first result.
* Subsequent results will be yielded as though there was no aggs parameter.
* To the best of my understanding, PushShift only returns 100 results per agg, and there is not
+3
View File
@@ -134,6 +134,9 @@ class PushshiftAPIMinimal(object):
return
if 'limit' not in payload:
payload['limit'] = self.max_results_per_request
if 'sort' not in payload:
# Getting weird results if this is not made explicit. Unclear why.
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):