code made prettier
This commit is contained in:
parent
3416cd493f
commit
5d1b5af75a
@ -90,16 +90,16 @@ export async function stream(url: string, quality?: number): Promise<Stream> {
|
||||
* @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[] = []
|
||||
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])
|
||||
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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,8 +1 @@
|
||||
export {
|
||||
video_basic_info,
|
||||
video_info,
|
||||
decipher_info,
|
||||
playlist_info,
|
||||
yt_validate,
|
||||
extractID
|
||||
} from './extractor';
|
||||
export { video_basic_info, video_info, decipher_info, playlist_info, yt_validate, extractID } from './extractor';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user