mmyjh86

[포스코] 네이버 도서 정보 - 1

Sep 14th, 2020 (edited)
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import requests
  2. from pandas import DataFrame
  3.  
  4. client_id = 'your_client_id'
  5. secret_id = 'your_secret_id'
  6.  
  7. url = 'https://openapi.naver.com/v1/search/book.json?query=파이썬'
  8.  
  9. headers = {
  10.     'X-Naver-Client-Id': client_id,
  11.     "X-Naver-Client-Secret":secret_id
  12. }
  13.  
  14. resp = requests.get(url, headers=headers)
  15. data =  resp.json()
  16. df = DataFrame( data['items']  )
  17. df.head()
RAW Paste Data