mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Be a bit more clear about what were doing
This commit is contained in:
parent
56e8c565c5
commit
00fe683a31
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue