-
Notifications
You must be signed in to change notification settings - Fork 66
Need options to NOT follow correctedQuery #146
Comments
but I don't think it have some meaning. it just increasing number by rule. and i also find some info on other youtube search engine library. so can we add this feature? also i think it will be good if this option is default parameter. |
it gets a bit harder since for some categories (e.g. |
It's okay if this isn't a default parameter. However, I can't understand well how the filter is implemented, but what I just found out is that if I decode the sp parameter applied to the original filter to binary, paste the binary decoded sp parameter (QgIIAQ==) to the back, and then encode it back to base64 and it works. Could this be possible? example: const filters1 = await ytsr.getFilters('some keyword doesnt search properly');
const filter1 = filters1.get('Type').get('Video');
const filters2 = await ytsr.getFilters(filter1.url);
const filter2 = filters2.get('Features').get('Live');
const options = {
exactMatch: true,
}
/*
if exactMatch is true, and it has no option
=> add sp "QgIIAQ==" to query object. result: ( query: { gl: 'US', hl: 'en', search_query: 'github' , sp: 'QgIIAQ=='} )
if exactMatch is true and it has sp.
=> decode sp, and paste binary-decoded 'QgIIAQ==' to the back and encode, update the sp
*/
const searchResults = await ytsr(filter2.url, options);
// result sp is EgQQAUABQgIIAQ== |
i made package with implementation of this issue + filters without get |
that would allow to set at least a single filter... |
When I search some video id, it searches weird things because the original query is changing. I don't know this problem is caused by youtube or this library.
Example:
When I search video id 47PchnnBBJA, (its game soundtrack)
It changes to correctedQuery: '47 cannABIS'.
So it gives me cannabis videos. but it solves when I change my hl, gl to my locale (ko-KR).
I think we need an option to not follow correctedQuery or features to search video id.
The text was updated successfully, but these errors were encountered: