mirror of
https://github.com/wassname/psaw.git
synced 2026-09-09 11:30:51 +08:00
Ensured sort is always explicit to fix some new unusual behavior.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user