티스토리 뷰
import requests
import json
class cNaverAPI_Search:
def __init__(self):
pass
def StartSearch_News(self, keyWord):
maxDisplay = 100
url = "https://openapi.naver.com/v1/search/news?"+'display='+str(maxDisplay)
clientId = 'ID'
clientSecret = 'SECRET'
queryString = '&query='+keyWord
header = {
'X-Naver-Client-Id':clientId,
'X-Naver-Client-Secret':clientSecret
}
response = requests.get(url+queryString, headers=header)
jsonDicts = response.json()
#print(jsonDicts.keys())
#print(jsonDicts.values())
for item1 in jsonDicts['items']:
print(item1['title'])
#print(json.loads(r.text))
반응형
'SWDesk > App' 카테고리의 다른 글
| [Python] Example for Google Drive API (0) | 2021.01.16 |
|---|---|
| JSON 배열 전송 및 수신 : Python to PHP (2) | 2021.01.13 |
| [Python] Example for Naver Search with selenium (0) | 2021.01.05 |
| [Python] Example for Google Search with selenium (0) | 2021.01.04 |
| [Python] Example for Daum Search with selenium (0) | 2021.01.02 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 빌리언트
- BiliChild
- 전류
- Video
- 아두이노
- bilient
- Innovation&Hurdles
- 심심풀이
- 오블완
- 허들
- 심심풀이치매방지기
- 티스토리챌린지
- 혁신과허들
- Hurdles
- image
- 치매방지
- 배프
- 전압
- 둎
- Innovations
- Decorator
- DYOV
- BSC
- Innovations&Hurdles
- 빌리칠드
- 치매
- 혁신
- 절연형
- arduino
- ServantClock
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
글 보관함

