Giter Site home page Giter Site logo

naver_movie_crawl's Introduction

naver_movie_crawl

0. 사용한 데이터

1. 파일 설명

1-1. kobis_300.py

KOFIC 엑셀 데이터를 다운 받아 2018년 관객수 상위 300 영화만 따로 잘라서 kobis_300.csv로 저장한 후,
컬럼값은 columns1 = ['영화명', '개봉일', '관객수', '대표국적'] 로 지정.

1-2. naver_movie.py

KOFIC 엑셀에서 영화 제목을 naver 검색 api에 넣어 각 영화별 고유 코드를 구한다.
영화 고유 코드를 넣은 url에서 requestsBeautifulSoup를 사용하여 필요한 정보들을 뽑아온다.
columns2 = ['네티즌 평점', '기자 평점', '장르', '상영시간', '관람등급', '비디오수']

1-2.1. search_movie()

영화 제목을 입력받아 naver 검색 api를 통해 영화 고유 코드를 전달받음.
문제 >> 영화 제목 내의 단어와 일치하는 모든 영화 제목을 출력함. 10개가 넘어가면 찾고 싶은 영화의 고유코드를 찾기 힘듦.
해결 >> 영화 제목 일치 여부와 제작년도로 필터링을 거침.

1-2.2. movie_info()

10개가 넘어가는 영화 제목 리스트의 경우에는 columns2의 값을 '-'로 지정. (나중에 직접 바꿔야 할듯)
가끔 있어야 할 위치에 정보가 없는 경우는.. 알아서 구분해야 할듯.

1-2.3. movie_info_sheet()

columns1columns2 값을 excel sheet에 저장하는 코드.
하지만 영화 고유 아이디를 10개까지만 받아올 수 있는 거 같아서 직접 코드를 많이 쳐야 한다..

2. 분석

아직 안 함

3. 후기

코드를 어떻게 해야 할지 모르겠는 부분이 많아서 직접 수정해야 하는 부분이 많을 거 같다.
영화 고유 아이디를 10개씩만 받아와서 redundant code repitition이 많은 거 같지만 어떻게 해야 할지 모르겠음..
분석은 할지 안 할지 모름.

naver_movie_crawl's People

Contributors

yuheunk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.