Categorygithub.com/MakeGolangGreat/archive-go
modulepackage
1.0.3
Repository: https://github.com/makegolanggreat/archive-go.git
Documentation: pkg.go.dev

# README

archive-go

一个检测链接 -> 爬取数据 -> 备份到Telegraph的 Golang 库。

工作流程:给我一些字符串,我会检测其中的链接,然后启动爬虫程序,将链接中的信息抓下来然后上传到 Telegraph 平台上,然后将 Telegraph 的文章链接返回给你。

同时提供保存纯文本的接口,将传入的文本直接保存到 Telegraph 平台,然后返回一个可访问的链接。

接口


请移步go doc

开始


  1. 下载依赖
go get -u github.com/MakeGolangGreat/archive-go
  1. test.go
package main

imoprt "github.com/MakeGolangGreat/archive-go"

func main(){
	link, err := archive.Save("<h1>html strings here</h1>", "...telegraph-token here...", "...attach info here...")
	if err != nil {
    fmt.Println("Save Article Failed: ", err)
  }else{
    fmt.Println(link)
  }
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Save 是一个备份函数,将链接内的文本抓取然后备份到Telegraph,然后返回一个Telegraph链接。.
Text 是一个备份函数,将传递过来的文本备份到Telegraph,不管里面有没有链接,全部当成文本备份 然后返回一个Telegraph链接.

# Structs

No description provided by the author