Git Product home page Git Product logo

anquanke's Introduction

概况

爬取安全客的安全知识版块和安全资讯版块的所有文章内容,进行分词预处理,并且存入mongodb中

网址分析

安全客:https://www.anquanke.com/

安全知识:https://www.anquanke.com/knowledge 共345页 每页10篇 约3450篇

安全资讯:https://www.anquanke.com/news 共279页 每页10篇 约2800篇

每页json:

https://api.anquanke.com/data/v1/posts?size=10&page=2&category=knowledge

https://api.anquanke.com/data/v1/posts?size=10&page=2&category=news

文章的url:https://www.anquanke.com/post/id/162589 (只需从源码中获取id号即可)

网页元素分析

安全知识的每页json:

https://api.anquanke.com/data/v1/posts?size=10&page=2&category=knowledge

帖子元素

对于每一篇文章,正文的定位为:

Xpath://div[@class='article-content']

数据存储结构

list表,存储每页json中的所有内容,包括了每篇文章的所有详细信息。

article表,每篇文章的具体内容:

key 意义
_id 文章id号,唯一,可确定url
url 文章的地址
article 文章正文内容

fenci表,对文本进行分词预处理的结果:

key 意义
_id 文章id号,唯一,可确定url
url 文章的地址
article 文章正文内容
article_no_url 过滤掉正文中的链接
article_chi 文章中的中文字符
article_chi_final 文章中的中文字符的分词结果
article_eng 文章中的英文字符
article_eng_final 文章中的英文字符的分词结果

anquanke's People

Contributors

leslie-lss avatar

Watchers

James Cloos 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.