Search fixed
This commit is contained in:
parent
0874f716dc
commit
f30c4f458b
@ -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,
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user