mirror of
https://github.com/wassname/psaw.git
synced 2026-09-11 12:30:19 +08:00
Abstracted out dataset from search api. Should probably rename the PushshiftAPI class as RedditApi or somesuch.
This commit is contained in:
@@ -177,9 +177,10 @@ class PushshiftAPIMinimal(object):
|
||||
kind,
|
||||
stop_condition=lambda x: False,
|
||||
return_batch=False,
|
||||
dataset='reddit',
|
||||
**kwargs):
|
||||
self.payload = copy.deepcopy(kwargs)
|
||||
endpoint = 'reddit/{}/search'.format(kind)
|
||||
endpoint = '{dataset}/{kind}/search'.format(dataset=dataset, kind=kind)
|
||||
url = self.base_url.format(endpoint=endpoint)
|
||||
for response in self._handle_paging(url):
|
||||
if 'aggs' in response:
|
||||
|
||||
Reference in New Issue
Block a user