Announcement

Collapse
No announcement yet.

Python developer needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cains77
    replied
    Hi Liam

    Is this still a working script ?

    I dont have a ssoid in my resp.headers response. So script will obvius fail.
    From my response i see a wsid, so tried that to see if it was changed to that, but then it failed with wrong token..

    Hope you can help.

    / Carsten


    Originally posted by LiamP View Post
    If you are using betfairlightweight (which you should ) then here is the code:


    Code:
    import re
    import betfairlightweight
    
    trading = betfairlightweight.APIClient('username', 'password', app_key='app_key')
    
    resp = trading.session.post(
    url=trading.login_interactive.url,
    data={
    "username": trading.username,
    "password": trading.password,
    "redirectMethod": "POST",
    "product": trading.app_key,
    "url": "https://www.betfair.com",
    "submitForm": True,
    }
    )
    session_token = re.findall(
    "ssoid=(.*?);", resp.headers["Set-Cookie"]
    )
    trading.set_session_token(session_token[0])
    
    print(trading.betting.list_event_types())

    Leave a comment:


  • LiamP
    replied
    If you are using betfairlightweight (which you should ) then here is the code:


    Code:
    import re
    import betfairlightweight
    
    trading = betfairlightweight.APIClient('username', 'password', app_key='app_key')
    
    resp = trading.session.post(
        url=trading.login_interactive.url,
        data={
            "username": trading.username,
            "password": trading.password,
            "redirectMethod": "POST",
            "product": trading.app_key,
            "url": "https://www.betfair.com",
            "submitForm": True,
        }
    )
    session_token = re.findall(
        "ssoid=(.*?);", resp.headers["Set-Cookie"]
    )
    trading.set_session_token(session_token[0])
    
    print(trading.betting.list_event_types())
    Last edited by LiamP; 25-04-2020, 07:06 AM.

    Leave a comment:


  • JAcks555
    replied
    Hi,

    I am struggling with the same login issue as you and was wondering if you ever found a way?


    Leave a comment:


  • dabasys
    started a topic Python developer needed

    Python developer needed

    Hey
    Are there any freelance python developers in here?

    I need a commandline tool in python, to get data from the betfair api, with football fixtures and their markets.

    The tricky part is that I am from Denmark, so the login thing is pretty tricky, when I have to use NemId.

    Anybody with experience in this and want to make a few bucks?
Working...
X