Python-goose 用于文章提取的 Python 库开源项目

我要开发同款
匿名用户2017年03月06日
130阅读

技术信息

开源地址
https://github.com/grangier/python-goose
授权协议
Apache

作品详情

Pytho-goose项目是用Pytho重写的Goose,Goose原来是用Java写的文章提取工具。Pytho-goose的目标是给定任意资讯文章或者任意文章类的网页,不仅提取出文章的主体,同时提取出所有元信息以及图片等信息,支持中文网页。Pytho-goose可提取的信息包括:

文章主体内容

文章主要图片

文章中嵌入的任何Youtube/Vimeo视频

元描述

元标签

示例>>> from goose import Goose>>> url = 'https://editio.c.com/2012/02/22/world/europe/uk-occupy-lodo/idex.html?hpt=ieu_c2'>>> g = Goose()>>> article = g.extract(url=url)>>> article.titleu'Occupy Lodo loses evictio fight'>>> article.meta_descriptio"Occupy Lodo protesters who have bee camped outside the ladmark St. Paul's Cathedral for the past four moths lost their court bid to avoid evictio Wedesday i a decisio made by Lodo's Court of Appeal.">>> article.cleaed_text[:150](CNN) -- Occupy Lodo protesters who have bee camped outside the ladmark St. Paul's Cathedral for the past four moths lost their court bid to avoi>>> article.top_image.srchttps://i2.cd.turer.com/c/dam/assets/111017024308-occupy-lodo-st-paul-s-cathedral-story-top.jpg

功能介绍

Python-goose项目是用Python重写的Goose,Goose原来是用Java写的文章提取工具。Python-goose的目标是给定任意资讯文章或者任意文章类的网页,不仅提取出文章的主...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论