Giter VIP home page Giter VIP logo

zolphonespider's Introduction

  • 中关村手机的爬虫

    • 专门爬取中关村在线手机频道的爬虫,对应网页链接为 http://detail.zol.com.cn/cell_phone/index1168709.shtml, http://detail.zol.com.cn/1169/1168709/param.shtml

    • 项目目录为:

      • /src = 真正爬虫项目文件
      • /static = 爬取后顺便下载的静态资源(手机的大图/产品图/测评图)
      • cell_phone_table.sql = 创建表结构sql
      • insert_example.sql = 30条样本数据sql
      • removeImage.php = 从旧版静态资源目录批量切换到新版资源目录的执行php文件
    • src里项目名字为jingdong,是因为一开始写时目标是京东的,后来发现京东太难爬,转向爬中关村,代码名字没有改过来,那就一直不改了。

    • 爬取步骤分两步:

    • 后来对爬取后的旧版资源目录不满意,写了个php程序修改成新的目录,就是文件removeImage.php,static列出了新旧两个样本

    • 爬虫框架是scrapy,详细使用方法不说了,自己去看原仓库 https://github.com/scrapy/scrapy

    • 目前不确定中关村有没对网页做结构变化或者反爬虫优化,反正前不久(18年10月左右)我运行了一次还能爬

    • 运行环境为python2.7,没有其他任何依赖(有也是看 pip install scrapy 不成功的报错了,自己针对报错信息对应处理,这里不一一说明了)

    • 本仓库仅用于技术开源,供爬虫爱好者研究。切勿使用本仓库用于非法商业行为,否则请自行承担责任,本人在此申明不承担任何由此生成的法律责任。

LICENSE 996.icu

zolphonespider's People

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.