Commit graph

50 commits

Author SHA1 Message Date
0a80a0086a
Added automatic BME login option
Signed-off-by: Balazs Toldi <balazs@toldi.eu>
2022-03-19 16:59:58 +01:00
f2810df95d Merge remote-tracking branch 'upstream/master' 2022-03-19 16:37:50 +01:00
snobu
7d91f32af2 Fix for null thumbnail URL 2021-05-11 11:06:16 +03:00
Jiří Vrba
ef91acaf10 Directly reference tokenCacheFile 2021-04-15 21:09:59 +02:00
Jiří Vrba
e9a0954528
Fix typo in .token_cache 2021-04-12 10:15:12 +02:00
Balazs Toldi
9dccceab1c
Adding the ability to download channel videos 2021-03-31 11:13:39 +02:00
Giuseppe Montuoro
55234af08f
Fixed minor linting error due to pull request #345. (#346) 2021-03-20 17:22:06 +02:00
Giuseppe Montuoro
8b2a02d0ae Template elements are no more mandatory in final name. 2021-03-18 16:37:35 +01:00
Adrian Calinescu
3c7d61febe
Fix return HTTP 403 reason with or without verbose (#315) 2021-01-26 14:49:42 +02:00
lukaarma
f8207f4fd1
Group parsing fix and error out on old ffmpeg version (#298)
* fixed parsing for group with more than 100 videos

* updated all packages to latest version

* Error on old ffmpeg binaries (closes #294)
minor linting fixes

* automatic update of files

Co-authored-by: Adrian Calinescu <foo@snobu.org>
2021-01-13 20:12:12 +02:00
Adrian Calinescu
f26204c38a
Revert "Fixed parsing for group with more than 100 videos (#288)" (#295)
This reverts commit cd1ac82fea.
2020-12-15 13:02:23 +02:00
lukaarma
cd1ac82fea
Fixed parsing for group with more than 100 videos (#288)
* fixed parsing for group with more than 100 videos
* updated all packages to latest version
2020-12-15 12:55:10 +02:00
snobu
e9070511cf Srsly really fixed group download this time 2020-11-14 20:08:45 +02:00
snobu
ad483f3eb7 Fix group download, now limited to first 100 videos 2020-11-14 19:54:50 +02:00
lukaarma
22968f42ea
Misc fixes (#244)
* cleared up docs

* fix 401 bug for images thumbnail
2020-10-08 16:00:28 +03:00
lukaarma
4545b010b3
Mino changes (#217)
* added Unipr info in the Specialized vesion section

* added response body on API call error (verbose)
2020-09-05 19:03:11 +03:00
beppe9000
7fc7c4733a
fix lint problems (#207) 2020-08-17 23:37:51 +03:00
beppe9000
a9f8b02f08
fix typo & sanitize video names on win32 (#205)
* fix typo & sanitize video names on win32
* add warning for invalid path
2020-08-15 16:38:01 +03:00
lukaarma
292c72aa1f
Title template (#194)
* added template option and validation

* update comment link to element list

* get author info when fetching video info

* added template elements to video object

* minor function naming changes

* better exit message for template error

* changed template elements for better substitution

* implemented video title template

* removed trailing decimals on duration

* added template description

* removed hashing from uniqueId
removed debug logger.warn()

* fixed typos in default template
added elements to template fail message

* moved ffmpeg version logging to verbose
2020-08-12 19:10:04 +03:00
lukaarma
23b71d47d4
Fix first login failing session evaluation (#191)
* fix first login triggering early using '-k' option

* updated specialized Destreamer versions
2020-07-23 22:48:10 +03:00
lukaarma
3144014a34
check for single url files/ files ending in url (#186) 2020-07-22 04:56:57 +03:00
lukaarma
78e5818cc3
Fix login for private tenants, improved refresh reliability (#181) 2020-07-19 10:50:23 +03:00
lukaarma
7bfc565a05
Major code refactoring (#164)
* Added Chromium caching of identity provider cookies

* Moved token expiry check in standalone method

* Created refreshSession function

* Session is now refreshed if the token expires

* Linting fixes

* Removed debug console.log()

* Added CC support

* Created function to prompt user for download parameters (interactive mode)

* Fix data folder for puppeteer

* Fixed multiple session error

* Fix token expire time

* Moved session refreshing to a more sensible place

* Changed Metadata name to Video (to better reflect the data structure)

* Complete CLI refactoring

* Removed useless sleep function

* Added outDir check from CLI

* Complete input parsing refactoring (both inline and file)

* Fixed and improved tests to work with the new input parsing

* Moved and improved output path generation to videoUtils

* Main code refactoring, added outpath to video type

* Minor changes in spacing and type definition style

* Updated readme after code refactoring

* Fix if inputFile doesn't start with url on line 1

* Minor naming change

* Use module 'winston' for logging

* Created logge, changed all console.log and similar to use the logger

* Added verbose logging, changed posterUrl property name on Video type

* Moved GUID extraction to input parsing

* Added support for group links

* Fixed test after last input parsing update

* Removed debug proces.exit()

* Changed from desc to asc order for group videos

* Updated test to reflect GUIDs output after parsing

* Added couple of comments and restyled some imports

* More readable verbose GUIDs logging

* Removed unused errors

* Temporary fix for timeout not working in ApiClient

* Explicit class member accessibility

* Defined array naming schema to be Array<T>

* Defined type/interface schema to be type only

* A LOT of type definitions
2020-07-18 22:49:36 +03:00
Simone Franco
81220ebe44 Fixed a typo in an error string 2020-06-09 17:59:39 +02:00
Adrian Calinescu
fa310661e9
Fix curly braces to comply with eslint rules (#141) 2020-05-19 18:41:28 +03:00
Adrian Calinescu
6132f895f3
Code cleanup to cleanly lint, added lint step to GitHub Action (#138) 2020-05-18 22:36:38 +03:00
Adrian Calinescu
2c48d103f2
Introduce singleton API client with retry policy (#130)
* Add singleton http client
* Removed refresh token logic
* Further cleanup after refresh token
* Make tests faster maybe
2020-05-18 20:34:57 +03:00
Adrian Calinescu
3cf49c5d1c
Fix passing arguments to Utils.ts (#137) 2020-05-18 20:15:22 +03:00
Gurjeet Singh
d9617df5ed
Don't wait for email field if username isn't provided (#123)
Destreamer waits for the `<input type="email">` 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.
2020-05-07 08:52:31 +03:00
molikuner
3a8ed600ac
Fix auto rename for duplicate video titles (#118)
* Fix `makeUniqueTitle` was not working with (custom) output format
* Add option to skip already existing files
* Update README to include --skip option

Co-authored-by: molikuner <molikuner@gmail.com>
2020-05-06 10:28:17 +03:00
snobu
94b6da7fae Fix output format in CLI 2020-05-02 17:03:47 +03:00
snobu
8902ccef80 Renamed re-encoding parameters, amended README 2020-05-02 16:58:20 +03:00
molikuner
c21fb96ff6
Add option to change encoder and container (#114)
This change enables the user to select a specific
container and/or encoder for the output. As this change
forces ffmpeg to use copy by default, destreamer now uses
mkv as default output. This might be needed when MS Streams
doesn't offer a mp4 compatible stream. mkv offers much more
support.
2020-05-02 16:47:18 +03:00
kylon
516f6ce2cd
Preserve input URL array order
* Implement forEachAsync
* Preserve input URL array order

Co-authored-by: kylon <kylonux@gmail.com>
2020-05-01 01:01:15 +03:00
Adrian Calinescu
042e79d57f
Add mid-download token refresh, fix headers length overflow bug (#93)
* Add mid-download token refresh and header size fix for Node v8

* Refactor puppeteer test

* Remove note on mid-download token refresh bug

* Add source maps to build step

* Fix npm build script
2020-04-26 22:54:05 +03:00
Don
67cb62ce3c
Add noCleanup argument (#95)
* Added noCleanup argument (don't delete temp audio/video files on ffmpeg error)
* Added argument to README

Co-authored-by: Aleksa Savic <savicaleksa83@gmail.com>
2020-04-26 18:03:03 +03:00
kylon
81a15b2023
Discard url queries when sanitizing urls (#77)
authored-by: kylon <kylonux@gmail.com>
2020-04-26 00:51:07 +03:00
Adrian Calinescu
a209d947b3
Workaround for Cygwin/MSYS progress bar (#84) 2020-04-22 01:22:59 +03:00
Adrian Calinescu
352b1eaa5e
Reintroduce Node 8.x support (#79)
* Fix Node 8.x support

* Add Node 8.x to CI build matrix
2020-04-21 12:42:08 +03:00
Bill
318026895b
Account for addtional query parameters when parsing video ID (#75)
* Account for extra query parameters when parsing video ID
* Use URL module to parse URL
2020-04-20 18:54:41 +03:00
snobu
de8585888f Fix error message for elevated shell 2020-04-18 20:19:27 +03:00
snobu
609cf43ee0 v2.0 RELEASE 2020-04-18 15:34:26 +03:00
snobu
65847cb29d Merge branch 'tokencache' of https://github.com/snobu/destreamer into tokencache 2020-04-16 19:47:36 +03:00
snobu
c11c9b6334 Breaking changes in CLI params 2020-04-16 19:47:30 +03:00
kylon
3b48221d27
Delete video file on SIGINT too and silence ENOENT error (#67)
Co-authored-by: kylon <kylonux@gmail.com>
2020-04-16 19:36:36 +03:00
kylon
d89c0eea8c
Fix progress bar, remove temp file on ffmpeg error (#66)
* Delete the video file on ffmpeg error

* rework chunk calculation (with more tests it turns out it was not good for all durations)

Co-authored-by: kylon <kylonux@gmail.com>
2020-04-16 19:21:02 +03:00
kylon
176fa6e214
Fixes and refactoring (#59)
* Input url list: Fix bad Windows behavior

* Minor output fix

* Fix all download issues
  - downloads are synchronous again
  - fix progress bar (fix #39)
  - nuke fluent and switch to a bug-free ffmpeg module (fessonia)

* Move destreamer process events to a new file, we may add more in the future, lets give them their own space

* Destreamer: Release packages and builder script

ETA when? :P

* Clean up

* Implement yargs checks and add --videoUrlsFile option

* Refactor error handling
  - Human readable
  - No magic numbers

* Handle mkdir error
  - remove reduntant message

* gitignore: don't add hidden files

* Implement --outputDirectories

This gives us more flexibility on where to save videos

..especially if your videos have all the same name <.<

* Rename utils -> Utils

* Fix tests

don't import yargs on files other than main

* Create scripts directory

* Update make_release path

* Fix typo

* Create CONTRIBUTING.md

Co-authored-by: kylon <kylonux@gmail.com>
2020-04-14 15:59:14 +03:00
snobu
05c36fe718 Temporary fix for exit code 0 2020-04-11 17:19:53 +03:00
snobu
7da49197b3 Fix typo chuncks -> chunks 2020-04-11 16:19:10 +03:00
kylon
9faa0c4846
Added ffmpeg progress bar via fluent-ffmpeg and progress libs (#57)
* Add fluent-ffmpeg back and cross-platform progress bar

* Repo clean up

Move ts files to src, build and output js files to build folder

* Do not print messages when exit code is 0

this is triggered by signal events

Co-authored-by: kylon <kylonux@gmail.com>
2020-04-11 16:12:46 +03:00