forked from jasmedia/gy-downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
39 lines (34 loc) · 1.1 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* File: index.js
* Project: gy-video-downloader
* File Created: Thursday, 19th September 2019 4:32:52 pm
* Author: Jaseem Jas ([email protected])
* -----
* Last Modified: Thursday, 19th September 2019 9:56:14 pm
* Modified By: Jaseem Jas ([email protected])
* -----
* Copyright 2019 - 2019 Mi Technica
*/
const gdrive = require('./index.js');
var url = 'https://drive.google.com/file/d/1EBXhF6liCBF9tgpGsGA6Mez33Z21bAs9';
// url = 'https://drive.google.com/file/d/1QQB0ASEsaR1_5x2bzVL3cP9UQuymw5IB';
// url = 'https://www.youtube.com/watch?v=LAXA9mhkEtc';
// gdrive.getInfo(url).then(function(formats) {
// console.log(formats);
// });
// console.log(gdrive.selectFormat('mp4', formats));
// NOTE:
// This is the format to use this module.
// folder_path like: /Users/jaseem/Desktop/gdrive-downloader
// downloader(url, format, folder_path, filename, cb)
console.time('download');
gdrive.download(
url,
'mp4',
'/Users/jaseem/Desktop/gdrive-downloader',
'kuttimama',
function() {
console.log('All downloaded are done.');
console.timeEnd('download');
}
);