Be a bit more clear about what were doing

This commit is contained in:
Michael Shepanski 2017-02-25 00:17:53 -05:00
parent 56e8c565c5
commit 00fe683a31

View file

@ -2,15 +2,18 @@
# -*- coding: utf-8 -*-
from getpass import getpass
from plexapi.exceptions import BadRequest
from plexapi.myplex import MyPlexAccount
from plexapi.myplex import MyPlexAccount, MyPlexResource
if __name__ == '__main__':
username = input('What is your plex.tv username: ')
password = getpass('What is your plex.tv password: ')
print(); count = 0
try:
for resource in MyPlexAccount(username, password).resources():
print('\nLogging into plex.tv..')
account = MyPlexAccount(username, password)
print('Fetching resources from: %s\n' % MyPlexResource.key)
count = 0
for resource in account.resources():
if resource.accessToken:
print('%s %s' % (resource.accessToken, resource.name))
count += 1