From d9617df5edcde49d652e055b48e7d319978026d6 Mon Sep 17 00:00:00 2001 From: Gurjeet Singh Date: Wed, 6 May 2020 22:52:31 -0700 Subject: [PATCH] Don't wait for email field if username isn't provided (#123) Destreamer waits for the `` tag to appear. But in some corporate environments, like mine, the videos are protected by proxies, which in turn ar protected by SSO/SAML. Since the SSO login may not have that input field's type set to 'email', the wait would eventually timeout. With this fix we wait for the "email" field only if --username option was used. Otherwise we let the user take the actions manually to take the browser to the video page. --- src/destreamer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/destreamer.ts b/src/destreamer.ts index 66436a5..bcca716 100644 --- a/src/destreamer.ts +++ b/src/destreamer.ts @@ -60,11 +60,14 @@ async function DoInteractiveLogin(url: string, username?: string): Promise target.url().includes(videoId), { timeout: 150000 });