Search returns quite small number of results for Multiple Word Queries
See original GitHub issueHello again Mr. Stoilov.
I am stuck in yet another issue involving the function Pinterest.search()
in Pinterest.py starting from Line 368. I have tried with both branches, the master branch as well as the board-section-refactor
branch.
Single Word Query
boards_query_result = pinterest.search(scope='boards', query='hello')
returns 250 boards, which is all good. The result is the same as the one returned by the UI. https://www.pinterest.com/search/boards/?q=hello&rs=typed&term_meta[]=hello|typed
But in case of double word query:
Double Word Query
boards_query_result = pinterest.search(scope='boards', query='hello world')
returns only 23 boards. Whereas, the expected results should have been: https://www.pinterest.de/search/boards/?q=hello world&rs=typed&term_meta[]=hello|typed&term_meta[]=world|typed
Any idea what might be the issue here? Or what might I be doing wrong this time 😄
Cheers and as always your help is very much appreciated. Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
The issue was in my logic for escaping the multi word queries…
this line
query = "%20".join(terms)
breaks two things:I am addressing this in thei PR: https://github.com/bstoilov/py3-pinterest/pull/24
Can you also check if I missed something?
Great I will merge the PR then, glad to be of help