# Scrapy
- [[selector]]
- [[Run Scrapy from a script]]
- [[selenium middleware]]
- [[navernews]]
## files
pipelines.py : 데이터 가공 및 DB저장을 수행하는 파일
settings.py : 기본설정을 정의해주는 파일이며, pipelines.py에서 정의한 클래스에 대해 어떤 클래스를 사용한 건지 정의해준다.
## contain class
```
//*[@id="prtdetails"]//span[contains(@class, "first-price")]/text()
```
## Error
### error: command 'gcc' failed with exit status 1
conda 로 설치합니다.
conda install scrapy
Linux 에서는 의존 패키지를 설치합니다.((https://wikidocs.net/4338))
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
## 참고
- https://excelsior-cjh.tistory.com/86?category=952027