forked from embee/woomy
youtube link workaround
This commit is contained in:
parent
cfbce016b9
commit
aedce9fc34
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,8 @@ module.exports = client => {
|
||||||
if(isLink) {
|
if(isLink) {
|
||||||
response = await fetch('https://www.googleapis.com/youtube/v3/search?key=' + client.config.keys.yt + '&part=id,snippet&maxResults=1&type=video&id=' + id);
|
response = await fetch('https://www.googleapis.com/youtube/v3/search?key=' + client.config.keys.yt + '&part=id,snippet&maxResults=1&type=video&id=' + id);
|
||||||
} else {
|
} else {
|
||||||
response = await fetch('https://www.googleapis.com/youtube/v3/search?key=' + client.config.keys.yt + '&part=id,snippet&maxResults=1&type=video&q=' + encodeURIComponent(query));
|
// TODO: replace this workaround
|
||||||
|
response = await fetch('https://www.googleapis.com/youtube/v3/search?key=' + client.config.keys.yt + '&part=id,snippet&maxResults=1&type=video&q=**' + encodeURIComponent(query) + '**');
|
||||||
};
|
};
|
||||||
|
|
||||||
let parsed = await response.json();
|
let parsed = await response.json();
|
||||||
|
|
Loading…
Reference in a new issue