From 23b71d47d4a70f897b5593f05132a4572cc07585 Mon Sep 17 00:00:00 2001 From: lukaarma Date: Thu, 23 Jul 2020 21:48:10 +0200 Subject: [PATCH] Fix first login failing session evaluation (#191) * fix first login triggering early using '-k' option * updated specialized Destreamer versions --- README.md | 10 +++++++--- src/destreamer.ts | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 781165d..ff46744 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,11 @@ _(Alternative artwork proposals are welcome! Submit one through an Issue.)_ This release would not have been possible without the code and time contributed by two distinguished developers: [@lukaarma](https://github.com/lukaarma) and [@kylon](https://github.com/kylon). Thank you! -[Politecnico di Milano][polisite] students may want to use this fork over at https://github.com/SamanFekri/destreamer which is a specialized implementation of this project with automatic logon. +### Customized vesions -Another specialized implementation (for University of Pisa this time) is available at https://github.com/Guray00/destreamer-unipi. +- [Politecnico di Milano][polimi]: fork over at https://github.com/SamanFekri/destreamer +- [Università di Pisa][unipi]: fork over at https://github.com/Guray00/destreamer-unipi +- [Università della Calabria][unical]: fork over at https://github.com/peppelongo96/UnicalDown ## What's new @@ -163,4 +165,6 @@ Please open an [issue](https://github.com/snobu/destreamer/issues) and we'll loo [node]: https://nodejs.org/en/download/ [git]: https://git-scm.com/downloads [wsl]: https://github.com/snobu/destreamer/issues/90#issuecomment-619377950 -[polisite]: https://www.polimi.it +[polimi]: https://www.polimi.it +[unipi]: https://www.unipi.it/ +[unical]: https://www.unical.it/portale/ diff --git a/src/destreamer.ts b/src/destreamer.ts index 4e4beef..3651af7 100644 --- a/src/destreamer.ts +++ b/src/destreamer.ts @@ -80,7 +80,7 @@ async function DoInteractiveLogin(url: string, username?: string): Promise target.url().includes('microsoftstream.com'), { timeout: 150000 }); + await browser.waitForTarget((target: puppeteer.Target) => target.url().endsWith('microsoftstream.com/'), { timeout: 150000 }); logger.info('We are logged in.'); let session: Session | null = null;