ade desmond
ade desmond

Reputation: 484

socket.gaierror: [Errno 11004] getaddrinfo failed,django

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))

Upvotes: 2

Views: 2008

Answers (1)

Rich L
Rich L

Reputation: 2175

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)

Upvotes: 0

Related Questions