Пример #1
0
def logout(request):
    #from django.contrib.auth import logout
    from account import logout
    previous_url = request.GET.get('next')
    logout(request)
    return HttpResponseRedirect(previous_url or '/')
Пример #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "WangYx"

import account as ac

url = input("请输入url: ")

if url.strip().endswith('login'):
    ret = ac.login()
    print(ret)
elif url.strip().endswith('logout'):
    ret = ac.logout()
    print(ret)
else:
    print("404,页面不错在")
Пример #3
0
def logout(request):
    #from django.contrib.auth import logout
    from account import logout
    previous_url = request.GET.get('next')
    logout(request)
    return HttpResponseRedirect(previous_url or '/')
Пример #4
0
def ajax_logout(request):

    from account import logout
    logout(request)
    return {}
Пример #5
0
def ajax_logout(request):

    from account import logout
    logout(request)
    return {}
Пример #6
0
 def POST(self):
     i = web.input(next=None, error="false")
     next = i.next or "/"
     account.logout()
     raise web.seeother(next)
Пример #7
0
        for name in files:
            # Upload files
            onedrive.upload(
                item_path='raspberrypi/robinhood/account/{0}'.format(name),
                upload_type='rename',
                file_path='./outputs/{0}'.format(name))
            # Remove local files
            os.remove('./outputs/{0}'.format(name))

    print("Files uploaded and local copies removed!")


#

# Main method
if __name__ == "__main__":
    # Login
    print("Logging into Robinhood...")
    account.login()
    print("Logged in")

    # Create Excel files
    create_holdings_table()  # current holdings
    create_option_orders_table()  # all option orders

    # Upload outputs
    upload_outputs()

    # Logout
    account.logout()
Пример #8
0
from account import login
from account import logout
data = raw_input("please enter your address:")
array = data.split('/')
if data == 'login()':
    login()
elif data == 'logout()':
    logout()
else:
    print 'address is incorrect'
Пример #9
0
        if not (acc.login()):
            sys.exit(0)
        else:
            pass

        # Success
        acc.log('Logged in - Lets get it!')
        buildCache()

        # Start selenium on seperate thread
        # (Scrapes robinhood websites for live doge price)
        # (RobinHood API doesnt offer live socket for prices)
        # (Also sending manual request every second could flag my account)
        browserThread = t.Thread(target=browserThread())
        browserThread.start()

        for x in range(10):
            print(f'Waiting {x}')
            time.sleep(1)

        acc.log('Stopping browser...')
        web.runBrowser(False)
        # Main loop
        #while True:
        #    price =
        #    time.sleep(1000)
    finally:
        # Logout on exit
        acc.logout()
        acc.log('Logged out - Goodbye.')