mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-14 04:25:36 +00:00
SSL and session
This commit is contained in:
parent
dd33595b98
commit
6f40d31f9d
@ -46,7 +46,17 @@ PLEX_TOKEN = CONFIG.data['auth'].get('server_token', PLEX_TOKEN)
|
|||||||
|
|
||||||
|
|
||||||
sess = requests.Session()
|
sess = requests.Session()
|
||||||
sess.verify = False
|
# Ignore verifying the SSL certificate
|
||||||
|
sess.verify = False # '/path/to/certfile'
|
||||||
|
# If verify is set to a path to a directory,
|
||||||
|
# the directory must have been processed using the c_rehash utility supplied
|
||||||
|
# with OpenSSL.
|
||||||
|
if sess.verify is False:
|
||||||
|
# Disable the warning that the request is insecure, we know that...
|
||||||
|
import urllib3
|
||||||
|
|
||||||
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
|
|
||||||
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess)
|
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess)
|
||||||
|
|
||||||
sections_lst = [x.title for x in plex.library.sections()]
|
sections_lst = [x.title for x in plex.library.sections()]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user