code made prettier

This commit is contained in:
killer069 2021-10-20 19:10:15 +05:30
parent 3416cd493f
commit 5d1b5af75a
3 changed files with 12 additions and 19 deletions

View File

@ -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];
}
/**

View File

@ -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';