collect

package
v0.0.0-...-c96783f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
)

Variables

This section is empty.

Functions

func Collect

func Collect(articleUrl string, toMarkdown bool) (title, content string, err error)

自动采集

Types

type GetImageAbsoluteUrlFunc

type GetImageAbsoluteUrlFunc func(inputSrc string) string

type WxArticle

type WxArticle struct {
	Id          int64  `json:"id"`          // 编号
	Title       string `json:"title"`       // 标题
	Author      string `json:"author"`      // 作者
	AppName     string `json:"appName"`     // 公众号名称
	AppID       string `json:"appId"`       // 公众号ID
	Cover       string `json:"cover"`       // 文章封面
	Intro       string `json:"intro"`       // 描述
	HtmlContent string `json:"htmlContent"` // 公众号文章html内容
	MdContent   string `json:"mdContent"`   // 公众号文章md内容
	TextContent string `json:"textContent"` // 文本内容
	PubAt       string `json:"pubAt"`       // 发布时间
	UrlMd5      string `json:"urlMd5"`      // 链接地址的md5
	RoundHead   string `json:"roundHead"`   // 圆头像
	OriHead     string `json:"oriHead"`     // 原头像
	Url         string `json:"url"`         // 微信文章链接地址
	SourceURL   string `json:"sourceUrl"`   // 公众号原文地址
	ArticleId   int64  `json:"articleId"`   // 发布线上返回的id
	Tags        string `json:"tags"`        // 标签字符串
	Category    string `json:"category"`    // 一级分类
	Categories  string `json:"categories"`  // 二级分类
	Copyright   string `json:"copyright"`   // 已经 0,1,2   微小宝那 1 标识为原创
	Video       string `json:"video"`       // 视频地址
	Audio       string `json:"audio"`       // 音频地址
	WxID        string `json:"wxId"`        // 微信公众号ID
	WxIntro     string `json:"wxIntro"`     // 微信公众号介绍
	Images      string `json:"images"`      // 图片
	PublishTime int64  `json:"publishTime"` // 采集器发布时间
	CreateTime  int64  `json:"createTime"`  // 创建时间
	UpdatedTime int64  `json:"updatedTime"` // 更新时间
}

type WxbotApi

type WxbotApi struct {
}

func NewWxbotApi

func NewWxbotApi() *WxbotApi

func (*WxbotApi) Publish

func (this *WxbotApi) Publish(wxArticle *WxArticle) (*model.Article, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL