2

I am trying create a Betfair interactive login following this [tutorial ][1] and i keep on getting and error my app_key is correct and my username and password also correct but i think i am not getting hoe to set it to work correctly please any help will be grateful here is my code

import requests
import json

login_hearders = {
        'Accept' : 'application/json',
        'X-Application':APP_KEY_HERE,
        'Content-Type':'application/x-www-form-urlencoded '}

url = 'https://identitysso.betfair.au/api/login'

payload = {'username':'USERNAME_HERE','password':'PASSWORD_HERE'}


r = requests.post(url, data=payload,headers=login_hearders)

print(json.loads(r.text))
ade desmond
  • 432
  • 1
  • 8
  • 24
  • Please don't be too lazy to find existing answers before asking such a simple question. Googling for "socket error: [Errno 11004]" gives you plenty of hints (BTW: Socket-Errors - recognizable due its number range 10000 – Heri May 05 '18 at 16:12

1 Answers1

0

I've no idea what tutorial you were trying to follow, however, that particular host (identitysso.betfair.au) is wrong. You want the com.au version.

me@host$ host identitysso.betfair.au
Host identitysso.betfair.au not found: 3(NXDOMAIN)

me@host$ host identitysso.betfair.com.au
identitysso.betfair.com.au has address 987.654.32.1

(not showing actual DNS resolution, since that's the point of DNS)

Rich L
  • 1,905
  • 2
  • 19
  • 30