티스토리 뷰
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
- BSC
- Innovation&Hurdles
- 빌리언트
- 심심풀이치매방지기
- 전류
- 배프
- bilient
- 혁신과허들
- 전압
- 치매방지
- BiliChild
- ServantClock
- DYOV
- 심심풀이
- 허들
- 티스토리챌린지
- Decorator
- 아두이노
- 둎
- arduino
- 오블완
- Hurdles
- image
- 치매
- Innovations&Hurdles
- 혁신
- Innovations
- 빌리칠드
- Video
- 절연형
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
글 보관함

