Naver Open API - endic ::'media' http://search.naver.com Naver Search Result Fri, 31 Jul 2009 11:17:34 +0900 24 1 5 media<SUP>1</SUP> http://openapi.naver.com/l?AAACupLEi1Tc1LyUxWK81MsTUxMzK1UCssTS2qtM1NTclMVMsoSk2zzSgpKVA1dlQ1cgMisGq9vMSy1CK95PxcVBFVY7eU/OTMFFVjF3MDcwtjAwBNvkKqYQAAAA== media<SUP>2</SUP> http://openapi.naver.com/l?AAACupLEi1Tc1LyUxWK81MsTUxMzK1UCssTS2qtM1NTclMVMsoSk2zzSgpKVA1dlQ1cgMisGq9vMSy1CK95PxcVBFVY7eU/OTMFFVjF3MDcwsTAwCKKAPlYQAAAA== 전송된 요청을 수행하는 동안 다음과 같은 에러가 발생하였습니다. 020 Unregistered key (등록되지 않은 키입니다.) ====== ElementTree ====== *[[http://effbot.org/zone/element-index.htm|ElementTree Overview]] *[[http://effbot.org/zone/element-index.htm|ElementTree Overview]] import xml.etree.ElementTree as ET ... ndicResult = ET.XML(xml_source_string) #find error if ndicResult.tag == '{naver:openapi}error': print ndicResult.text print "%s: %s"%(ndicResult.find('{naver:openapi}error_code').text, ndicResult.find('{naver:openapi}message').text) elif ndicResult.tag == 'rss': #find channel ndicChann = ndicResult[0] #ndicResult.find('channel') ndicItems = (i for i in ndicChann if i.tag=="item") ndicLinks = map(lambda x: x.find('link').text, ndicItems)