dataitgirls2 / m3

상권분석 프로젝트
MIT License
12 stars 22 forks source link

네이버 크롤링 #12

Open jy617lee opened 6 years ago

jy617lee commented 6 years ago
jy617lee commented 6 years ago

https://github.com/xotrs/naver-blog-crawler 의 크롤러 사용 시도

--> 401 unauthorized 에러 해결중 --> 검색 기간을 설정할 수 없는 문제가 있음

jy617lee commented 6 years ago

https://gist.github.com/allieus/614c732941b3e3725b595f787a1efc57#file-crawl_naver_blog-py 크롤러 사용 시도

--> 특정 블로그의 모든 포스팅을 긁어오는 크롤러로 --> 검색어와 검색기간을 설정해와야 하는 우리의 요구사항과는 맞지 않음

jy617lee commented 6 years ago

http://chromedriver.chromium.org/getting-started

HeeYoungK commented 6 years ago

https://kimdoky.github.io/python/2017/06/15/python-openAPI(Naver)-crawling.html 오늘 밤 시도 예정!

HeeYoungK commented 6 years ago

https://developers.naver.com/products/search/ 네이버 검색 api 등록 시도중

jy617lee commented 6 years ago

https://github.com/dataitgirls2/m3/commit/14d36cd0f58ee90f2e2abe27c21ef190cb567c3a

[완료]

  1. 기간, 키워드를 설정 후 블로그 검색 시 검색결과로 나오는 네이버 블로그의 url
  2. 하나의 블로그에서 포스트 제목, 내용 크롤링

[tbd]

  1. 하나의 키워드로 검색된 모든 네이버 블로그 포스트의 제목, 내용 크롤링
  2. 크롤링 결과 .csv 파일로 저장
  3. pandas를 이용해 방송 전/후 포스팅 수 그래프 그려보기
jy617lee commented 6 years ago

엑셀로 저장하는 코드입니다 @HeeYoungK 참고해주세요!

import xlwt wb = xlwt.Workbook() ws = wb.add_sheet('nanohana_title') ws.write(titles) wb.save('C:/dateGirls/m3/example.xls')

HeeYoungK commented 6 years ago

오전에 한 것

  1. str을 리스트나 딕셔너리로 변환한 후 정규표현식으로 원하는 칼럼 뽑아내기 : 정규표현식 성공, 다른 타입으로 변환은 시도x
  2. json 데이터 정리하기(?) 시작
jy617lee commented 6 years ago

완료 코드 : https://github.com/jy617lee/naver_blog_crawler 결과물 : 나노하나 검색어에 대한 두달 치 블로그 포스팅 크롤러 결과를 공용드라이브 raw_data 폴더에 업로드 해두었습니다.