- Create workspace directory
mkdir spider
cd spider
- Install python environment
pip install pipenv
- Install dependencies
curl -O https://download.lfd.uci.edu/pythonlibs/gjr6o2id/Twisted-17.9.0-cp36-cp36m-win_amd64.whl
pipenv install ./Twisted-17.9.0-cp36-cp36m-win_amd64.whl
pipenv install scrapy
pipenv install pypiwin32
pipenv install patool
-
Create spider project
pipenv shell scrapy startproject subtitles cd subtitles scrapy genspider zimuku www.zimuku.cn
-
Crawl
http://www.zimuku.cn
with movie name and output file namescrapy crawl -a movie='intern' -s file='subtitles.json' zimuku
-
Crawl
http://www.zimuku.cn
for testscrapy shell "http://www.zimuku.cn"
-
-
Run python script file
pipenv run python run.py
-
Install from the Pipfile.lock
pipenv install --ignore-pipfile
-
Install from requirements.txt
pipenv install -r path/to/requirements.txt
python -m http.server 8000
python -m webbrowser -t "http://localhost:8000"
-
Install nodejs and ESLint
npm install -g eslint babel-eslint
-
Install SublimeLinter and SublimeLinter-eslint on Sublime Text
Ctrl+Shift+P
- Input
Install Package
- Input
SublimeLinter
and pressEnter
Ctrl+Shift+P
- Input
Install Package
- Input
SublimeLinter-eslint
and pressEnter
-
Initialize eslintrc file in the project
cd ${PROJECT_PATH} eslint --init