Git Product home page Git Product logo

taobaocrawler's Introduction

taobaoCrawler

step 1: 修改配置文件config.yml,新增阿布云代理参数

  cp config.sample.yaml config.yaml 

step 2: 将需要抓取的url写入redis对应的key中, 类型list

  REDIS_HOST = "localhost"
  REDIS_PORT = 6379
  REDIS_DB = 3
  REDIS_URL_KEY_LIST = "taobao_1688_urls" 

step 3: 准备一些session cookie数据到redis对应的key中,类型string,前缀如下

  REDIS_SESSION_KEY_PREFIX = taobao_1688_session

step 4: 打开终端,执行爬虫

 scrapy crawl taobao1688    # 自动把redis中抓取完成的key删除


 scrapy crawl taobao1688 -a remove_key=False   # 不删除redis中抓取完成的key

step 5: 在mongo数据库中查看数据

  MONGODB_SERVER = "localhost"
  MONGODB_PORT = 27017
  MONGODB_DB = "taobao_1688"
  MONGODB_COLLECTION = "product_sku"

taobaocrawler's People

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.