-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
length of search output not constrained by "max_results" #64
Comments
thanks for flagging this. will issue a patch soon. |
Great thanks. I have a quick question regarding more complex searches. I get comparable results in Tuber, YouTube API, and on the YouTube GUI when I search a single word. But when I want something more complex ( like “bear AND drone”) the Tuber results are much different (even if I try “bear drone”, “bear and drone”). Can you comment on this? |
When you say YouTube GUI, do you mean searching right on YouTube.com? If so, that is perfectly understandable. Google there is trying to think about user intent and likely has a ML model. In the API, it is generally doing is this phrase there or not. But let's do this step by step. |
OK thanks for the clarification. Yes I means YouTube.com. That makes sense about the ML model. But we should expect the Tuber and API results to always be comparable? If I search “bead drone” I should get comparable results in each? Are Boolean operators allowed? AND, OR? |
Good q. See the API documentation here: https://developers.google.com/youtube/v3/docs/search/list "Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the q parameter value to boating|sailing. Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter value to boating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is %7C." |
Excellent! This is very helpful. Thanks. Will try when I’m back at my computer and report back. Thanks again. |
Thanks, this works well. Now what about "&" or "and". I understand from the API documentation I can get boating or sailing with boating|sailing, but what if I want boating and sailing? With "boating and sailing", the API returns titles with boating (or boat) and sailing in the title. Tuber doesn't seem to, just titles that have one of the words, or none, maybe sailing in the title. |
I am wondering about the same thing about "&". |
Just a heads up:
Also, if there is the length of returned searches always constrained near 500? Some searches that I expect 1000's of hits ("wildlife, or "cats") only seem to produce 450, or 550 results?
The text was updated successfully, but these errors were encountered: