mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Added User agents support
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { setUserAgent } from './Request/useragent';
|
||||
import { setSoundCloudToken } from './SoundCloud';
|
||||
import { setSpotifyToken } from './Spotify';
|
||||
import { setCookieToken } from './YouTube/utils/cookie';
|
||||
@@ -15,6 +16,7 @@ interface tokenOptions {
|
||||
youtube?: {
|
||||
cookie: string;
|
||||
};
|
||||
useragent?: string[];
|
||||
}
|
||||
/**
|
||||
* Sets
|
||||
@@ -25,6 +27,8 @@ interface tokenOptions {
|
||||
*
|
||||
* iii> Spotify :- client ID, client secret, refresh token, market.
|
||||
*
|
||||
* iv> Useragents :- array of string.
|
||||
*
|
||||
* locally in memory.
|
||||
* @param options {@link tokenOptions}
|
||||
*/
|
||||
@@ -32,4 +36,5 @@ export function setToken(options: tokenOptions) {
|
||||
if (options.spotify) setSpotifyToken(options.spotify);
|
||||
if (options.soundcloud) setSoundCloudToken(options.soundcloud);
|
||||
if (options.youtube) setCookieToken(options.youtube);
|
||||
if (options.useragent) setUserAgent(options.useragent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user