feat: add option to change geolocation & fix minor bugs, closes #34

This commit is contained in:
luan.lrt4@gmail.com
2022-04-19 05:35:11 -03:00
parent e32981728b
commit dbc8b62ba2
8 changed files with 109 additions and 155 deletions

View File

@@ -197,7 +197,7 @@ class OAuth {
const url_body = Constants.OAUTH.REGEX.AUTH_SCRIPT.exec(yttv_response.data)[1];
const script_url = `${Constants.URLS.YT_BASE}/${url_body}`;
const response = await Axios.get(script_url, Constants.DEFAULT_HEADERS).catch((error) => error);
const response = await Axios.get(script_url, Constants.DEFAULT_HEADERS()).catch((error) => error);
if (response instanceof Error) throw new Error(`Could not extract client identity: ${response.message}`);
const client_identity = response.data.replace(/\n/g, '').match(Constants.OAUTH.REGEX.CLIENT_IDENTITY);