Pycharm下搭建scrapy爬虫环境python3.5

C:\Users\Administrator>pip install virtualenvwrapper-win

配置WORKON_HOME环境变量
WORKON_HOME    我自己设置的目录是   E:\code\python\ENV

默认python版本
C:\Users\Administrator>mkvirtualenv article
指定python版本
C:\Users\Administrator>mkvirtualenv --python=/python.exe py3scrapy
C:\Users\Administrator>pip install scrapy

E:\code\python>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
article

E:\code\python>workon article
(article) E:\code\python>scrapy startproject ArticleSpider
New Scrapy project 'ArticleSpider', 
using template directory 'e:\\code\\python\\env\\article\\lib\\site-
packages\\scrapy\\templates\\project', created in:
    E:\code\python\ArticleSpider

You can start your first spider with:
    cd ArticleSpider
    scrapy genspider example example.com

(article) E:\code\python>cd ArticleSpider

(article) E:\code\python\ArticleSpider>scrapy genspider  jobbole blog.jobbole.com
Created spider 'jobbole' using template 'basic' in module:
  ArticleSpider.spiders.jobbole

(article) E:\code\python\ArticleSpider>

补充:

selenium的webdriver的网址
http://selenium-python.readthedocs.io/installation.html
pip install selenium

    原文作者:王社英
    原文地址: https://www.jianshu.com/p/b17415949c46
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞