scrapy ( 네이버 부동산 크롤링 + ELK tutorial )
virtualenv 환경에 설치하는 것을 권장한다.
$sudo pip install virtualenv
virtual env를 생성하고 활성화한다.
$virtualenv ENV
$source ./ENV/bin/activate
$pip install Scrapy
$pip3 install ScrapyElasticSearch
$pip install scrapy-useragents
settings.py에 # Elastic Search 부분을 설정한다.
# -----------------------------------------------------------------------------
# Elastic Search
# -----------------------------------------------------------------------------
ITEM_PIPELINES = {
'scrapyelasticsearch.scrapyelasticsearch.ElasticSearchPipeline': 500
}
ELASTICSEARCH_SERVERS = ['localhost:9200']
ELASTICSEARCH_INDEX = 'scrapy'
ELASTICSEARCH_TYPE = 'items'
#scrapy crawl land