api icon indicating copy to clipboard operation
api copied to clipboard

Boolean Operator

Open scraperhelp opened this issue 5 years ago • 0 comments

I am using the following code to search reddit to search for keywrod 1 (KW1) and keyword 2 (KW2):

api = PushshiftAPI() submissions = api.search_submissions(q= 'KW1+KW2')

I am wondering how to use the boolean operator in terms of getting the "AND" function I am getting the same results whether I add the "+" key (i.e. 'KW1+KW2') or not (i.e. 'KW1 KW2') OR using a comma (i.e. 'KW1, KW2').

I am getting the "NOT" to only work when there's a space between the KWs (i.e. 'KW1 -KW2') but not when I there is no space, even though the manual does not have space (i.e 'KW1-KW2')

Please clarify.

scraperhelp avatar Apr 09 '20 23:04 scraperhelp