diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2021-08-15 15:03:05 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2021-08-15 15:03:05 -0400 |
| commit | 5fcb2c40b38cde03044532ebe0e42e6d21fa10c7 (patch) | |
| tree | af4a7c5b3aa437b4c525198bfb5ffe158265678b /index.js | |
| parent | dd26992095268bb15aa864d19185aaa1252dafb4 (diff) | |
| download | YouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.tar.gz YouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.tar.bz2 YouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.zip | |
updated package
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -25,7 +25,12 @@ function cookieDump(cookies) { } app.whenReady().then(() => { - createWindow() + console.log("Started YouTube TV Client 2.0"); + createWindow(); + + session.defaultSession.cookies.get({ + url: 'https://youtube.com/tv' + }); session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => { details.requestHeaders['User-Agent'] = 'Mozilla/5.0 (Linux; Tizen 2.3) AppleWebKit/538.1 (KHTML, like Gecko)Version/2.3 TV Safari/538.1'; @@ -33,22 +38,22 @@ app.whenReady().then(() => { }); app.on('activate', function () { - if (BrowserWindow.getAllWindows().length === 0) createWindow() - }) + if (BrowserWindow.getAllWindows().length === 0) createWindow(); + }); - }) + }); app.on('window-all-closed', function () { - if (process.platform !== 'darwin') app.quit() + if (process.platform !== 'darwin') app.quit(); session.defaultSession.cookies.get({ url: 'https://youtube.com/tv' }) .then((cookies) => { - cookieDump(cookies) - console.log("Wrote Cookies") + cookieDump(cookies); + console.log("Wrote Cookies"); }).catch((error) => { - console.log(error) - }) + console.log(error); + }); -})
\ No newline at end of file +});
\ No newline at end of file |
