Add option to pass raw headers to setup() (in place of terminal input)

Based on this change, coverage now runs without user input
This commit is contained in:
sigma67 2020-05-19 15:49:55 +02:00
commit 3f186d4e00
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
4 changed files with 20 additions and 21 deletions

View file

@ -2,6 +2,7 @@
brand_account = 101234229123420379537
headers = headers_auth_json_as_string
headers_file = ./headers_auth.json
headers_raw = raw_headers_pasted_from_browser
[playlists]
own = owned_playlist_id

View file

@ -15,7 +15,7 @@ class TestYTMusic(unittest.TestCase):
self.assertRaises(Exception, YTMusic, "{}")
def test_setup(self):
YTMusic.setup(config['auth']['headers_file'])
YTMusic.setup(config['auth']['headers_file'], config['auth']['headers_raw'])
###############
# BROWSING