Beispiel #1
0
def stop_broadcast():
    ig = InstaLiveCLI(auth=session['settings'])
    print(session['settings'])
    print('> Stopping Broadcast')
    stop = ig.end_broadcast()
    print('- Broadcast Stopped', stop)
    return stop
Beispiel #2
0
def refresh_handle():
    print('> Refreshing Stream Key')
    live = InstaLiveCLI(auth=session['settings'])
    live.create_broadcast()
    session['settings'] = live.settings

    return redirect(url_for('base.info_route'))
Beispiel #3
0
def start_broadcast():
    ig = InstaLiveCLI(auth=session['settings'])
    print(session['settings'])

    print('> Starting Broadcast')
    start = ig.start_broadcast()
    print('- Broadcast Started', start)
    return start
Beispiel #4
0
def toggle_mute_comments(mute):
    ig = InstaLiveCLI(auth=session['settings'])
    if mute:
        print("> Unmute Comments")
        return ig.unmute_comment()
    else:
        print("> Mute Comments")
        return ig.mute_comments()
class TestAccountTwoFactor(unittest.TestCase):
    def setUp(self):
        self.app = InstaLiveCLI(credentials.USERNAME_TWOFACTOR,
                                credentials.PASSWORD_TWOFACTOR)

    def test_login_with_twofactor(self):
        login = self.app.login()

        if self.app.two_factor_required:
            two_factor = self.app.two_factor(code=input('Enter Code: '))
            self.assertTrue(two_factor)
Beispiel #6
0
def info_route():

    try:
        settings = session['settings']
    except:
        return redirect(url_for('base.login_route'))

    print('> Update Broadcast Status')
    live = InstaLiveCLI(auth=session['settings'])
    session['settings']['data_stream']['status'] = live.get_broadcast_status()
    
    return render_template('pages/dashboard.html',data_stream=session['settings']['data_stream'])
class TestAccountStandard(unittest.TestCase):
    def setUp(self):
        self.app = InstaLiveCLI(credentials.USERNAME, credentials.PASSWORD)

    def test_login(self):
        login = self.app.login()
        self.assertTrue(login)
Beispiel #8
0
def login_handle():
    live = InstaLiveCLI(username=request.form['username'],password=request.form['password'])
    print('> Login to Instagram Server')
    login_status = live.login()

    if login_status:
        print('- Login Success')

        print('> Creating Broadcast')
        live.create_broadcast()

        print(live.settings)
        print('> Saving Cookies')
        session['settings'] = live.settings

        return redirect(url_for('base.info_route'))

    
    flash('Username or Password incorrect!')

    return redirect(url_for('base.login_route'))
Beispiel #9
0
def send_comments(text):
    ig = InstaLiveCLI(auth=session['settings'])
    print("> Sending Comments :"+text)
    return ig.send_comment(text)
Beispiel #10
0
def get_comments():
    ig = InstaLiveCLI(auth=session['settings'])
    print("> Getting Comments")
    return ig.get_comments()
Beispiel #11
0
def get_viewers():
    ig = InstaLiveCLI(auth=session['settings'])
    print("> Getting Viewers")
    user, id = ig.get_viewer_list()
    return user
Beispiel #12
0
 def setUp(self):
     self.app = InstaLiveCLI(credentials.USERNAME, credentials.PASSWORD)
Beispiel #13
0
 def setUp(self):
     self.app = InstaLiveCLI(credentials.USERNAME_TWOFACTOR,
                             credentials.PASSWORD_TWOFACTOR)
from InstaLiveCLI import InstaLiveCLI

live = InstaLiveCLI(settings='auth.json')

a = live.create_broadcast()
# live.export_settings('auth.json')
# live.start_broadcast()
# live.live_info()
print(live.get_broadcast_status())
print(live.settings)

# start new
# live = InstaLiveCLI(
#     username='******',
#     password='******'
# )

# live.login()
# live.export_settings('auth.json')
# print(live.settings)
Beispiel #15
0
from InstaLiveCLI import InstaLiveCLI

live = InstaLiveCLI()

live.start()