Search fixed

This commit is contained in:
killer069 2021-10-05 11:09:41 +05:30
parent 0874f716dc
commit f30c4f458b
3 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ export async function video_basic_info(url: string, options: InfoOptions = {}) {
description: vid.shortDescription,
duration: vid.lengthSeconds,
duration_raw: parseSeconds(vid.lengthSeconds),
uploadedDate: microformat.publishDate,
uploadedAt: microformat.publishDate,
thumbnail: vid.thumbnail.thumbnails[vid.thumbnail.thumbnails.length - 1],
channel: {
name: vid.author,

View File

@ -152,7 +152,7 @@ async function proxy_getter(req_url: string, req_proxy: Proxy[]): Promise<ProxyO
*/
export async function request(url: string, options?: RequestOpts): Promise<string> {
return new Promise(async (resolve, reject) => {
if (!options?.proxies) {
if (!options?.proxies || options.proxies.length === 0) {
let data = '';
let res = await https_getter(url, options).catch((err: Error) => err);
if (res instanceof Error) {