mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
code made prettier
This commit is contained in:
@@ -89,17 +89,17 @@ export async function stream(url: string, quality?: number): Promise<Stream> {
|
||||
* Function to get Free Client ID of soundcloud.
|
||||
* @returns client ID
|
||||
*/
|
||||
export async function getFreeClientID(): Promise<string>{
|
||||
const data = await request('https://soundcloud.com/')
|
||||
const splitted = data.split('<script crossorigin src="')
|
||||
const urls: string[] = []
|
||||
export async function getFreeClientID(): Promise<string> {
|
||||
const data = await request('https://soundcloud.com/');
|
||||
const splitted = data.split('<script crossorigin src="');
|
||||
const urls: string[] = [];
|
||||
splitted.forEach((r) => {
|
||||
if(r.startsWith('https')) {
|
||||
urls.push(r.split('"')[0])
|
||||
if (r.startsWith('https')) {
|
||||
urls.push(r.split('"')[0]);
|
||||
}
|
||||
})
|
||||
const data2 = await request(urls[urls.length - 1])
|
||||
return data2.split(',client_id:"')[1].split('"')[0]
|
||||
});
|
||||
const data2 = await request(urls[urls.length - 1]);
|
||||
return data2.split(',client_id:"')[1].split('"')[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user