mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-25 13:10:17 +00:00
Be even more verbose
This commit is contained in:
parent
00fe683a31
commit
35c69f65cb
1 changed files with 10 additions and 5 deletions
|
@ -6,14 +6,19 @@ from plexapi.myplex import MyPlexAccount, MyPlexResource
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('List Plex Tokens')
|
||||
print('----------------')
|
||||
print('This is a simple utility to fetch and list all known Plex Server')
|
||||
print('tokens your plex.tv account has access to. Because this information')
|
||||
print('comes from the plex.tv website, we need to ask for your username')
|
||||
print('and password. Alternatively, if you do not wish to enter your login')
|
||||
print('information below, you can retrieve the same information from plex.tv')
|
||||
print('directly at the URL: %s\n' % MyPlexResource.key)
|
||||
username = input('What is your plex.tv username: ')
|
||||
password = getpass('What is your plex.tv password: ')
|
||||
try:
|
||||
print('\nLogging into plex.tv..')
|
||||
account = MyPlexAccount(username, password)
|
||||
print('Fetching resources from: %s\n' % MyPlexResource.key)
|
||||
count = 0
|
||||
for resource in account.resources():
|
||||
count = 0; print()
|
||||
for resource in MyPlexAccount(username, password).resources():
|
||||
if resource.accessToken:
|
||||
print('%s %s' % (resource.accessToken, resource.name))
|
||||
count += 1
|
||||
|
|
Loading…
Reference in a new issue