Code Monkey home page Code Monkey logo

news-crawler-data-processing's Introduction

News-crawler-data-processing

项目需要处理爬虫爬取的新闻网站数据,于是有了本项目。

文件说明

nefu_news.xlsx: 新闻爬取结果,手动在首列添加了id列名

cluster_id.txt: 聚类结果,每个数组代表一个聚类

nefu_news_removal.xlsx: 去重后的新闻数据,未添加type

add_type_nefu_news.xlsx: 添加type列后的新闻数据

requirements.txt: 环境配置文件,有许多多余的包,只要有pandas和xlrd就能运行了(大概)

代码功能

duplicate_removal.py: 去重新闻数据(由于新闻网站迷之代码,每页都有隐藏的上页的新闻)

add_type_column.py: 将聚类结果添加至type

clear_database.py: 清除Django框架中的sqlite数据,以备更新数据用

excel_to_database.py: 将add_type_nefu_news.xlsx中的数据添加至数据表中

运行顺序

duplicate_removal.py => add_type_column.py => clear_database.py => excel_to_database.py

news-crawler-data-processing's People

Contributors

supershinningfinger avatar

Stargazers

 avatar  avatar  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.