편집 기록

편집 기록
  • 프로필 nowp님의 편집
    날짜2023.11.17

    공공데이터 api 호출 관련해


    import requests
    import json
    
    url = 'http://apis.data.go.kr/1360000/MidFcstInfoService/getMidFcst'
    
    params ={'serviceKey' : '서비스 키', 'pageNo' : '1', 'numOfRows' : '10', 'dataType' : 'JSON', 'stnId' : '108', 'tmFc' : '201310170600' }
    response.encoding = 'utf-8'
    response = requests.get(url, params=params)
    
    print(response.content)
    

    의 결과가

    b'{"response":{"header":{
      "resultCode":"99",
      "resultMsg":"\xec\xb5\x9c\xeb\x8c\x80 \xec\xa1\xb0\xed\x9a\x8c \xea\xb8\xb0\xea\xb0\x84\xec\x9d\x80 \xec\x98\xa4\xeb\x8a\x98 \xea\xb8\xb0\xec\xa4\x80\xec\x9c\xbc\xeb\xa1\x9c 1\xec\x9d\xbc \xec\xa0\x84\xea\xb9\x8c\xec\xa7\x80\xec\x9e\x85\xeb\x8b\x88\xeb\x8b\xa4."}}}' 
    

    인 이유는 뭔가요?

  • 프로필 4pple2님의 편집
    날짜2023.11.06

    공공데이터 api 호출 관련해


    import requests import json

    url = 'http://apis.data.go.kr/1360000/MidFcstInfoService/getMidFcst'

    params ={'serviceKey' : '서비스 키', 'pageNo' : '1', 'numOfRows' : '10', 'dataType' : 'JSON', 'stnId' : '108', 'tmFc' : '201310170600' } response.encoding = 'utf-8' response = requests.get(url, params=params)

    print(response.content) 의 결과가 b'{"response":{"header":{"resultCode":"99","resultMsg":"\xec\xb5\x9c\xeb\x8c\x80 \xec\xa1\xb0\xed\x9a\x8c \xea\xb8\xb0\xea\xb0\x84\xec\x9d\x80 \xec\x98\xa4\xeb\x8a\x98 \xea\xb8\xb0\xec\xa4\x80\xec\x9c\xbc\xeb\xa1\x9c 1\xec\x9d\xbc \xec\xa0\x84\xea\xb9\x8c\xec\xa7\x80\xec\x9e\x85\xeb\x8b\x88\xeb\x8b\xa4."}}}' 인 이유는 뭔가요?