Commit dd7d7801 authored by Martin Schrott's avatar Martin Schrott
Browse files

fixed bug in getMeetings when more than one meeting was running

parent ce71ea56
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
### to use this script you will need to ###
# apt install pip3
# pip3 install bigbluebutton_api_python
# pip3 install pyyaml
import argparse, sys, os, logging, yaml, urllib, json
from bigbluebutton_api_python import BigBlueButton
......@@ -8,7 +13,7 @@ logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
parser = argparse.ArgumentParser()
parser.add_argument("-s","--server", help="Big Blue Button Server URL")
parser.add_argument("-c","--config", help="path to config file in yaml format e.g. your docker-compose.yml", default="../docker-compose.yml")
parser.add_argument("-c","--config", help="path to config file in yaml format e.g. your docker-compose.yml", default="./docker-compose.yml")
parser.add_argument("-p","--secret", help="Big Blue Button Secret")
args = parser.parse_args()
......@@ -41,10 +46,17 @@ if not args.server and not args.secret:
sys.exit()
bbb = BigBlueButton(args.server,args.secret)
meetings = get_meetings()
for meeting in meetings['xml']['meetings']:
print(meetings['xml']['meetings'][meeting]['meetingName'])
print("ID: {}".format(meetings['xml']['meetings'][meeting]['meetingID']))
print("ATTENDEE_PASSWORD: {}".format(meetings['xml']['meetings'][meeting]['attendeePW']))
print("MODERATOR_PASSWORD: {}".format(meetings['xml']['meetings'][meeting]['moderatorPW']))
meetingsXML = get_meetings()
rawMeetings = meetingsXML['xml']['meetings']['meeting']
meetings = []
if isinstance(rawMeetings, list):
meetings = rawMeetings
else:
meetings.append(rawMeetings)
for meeting in meetings:
print(meeting['meetingName'])
print("ID: {}".format(meeting['meetingID']))
print("ATTENDEE_PASSWORD: {}".format(meeting['attendeePW']))
print("MODERATOR_PASSWORD: {}".format(meeting['moderatorPW']))
print("")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment