reader

package module
v0.0.0-...-b7d44f7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: BSD-3-Clause Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Installation

$ go get github.com/mycalf/reader-go

Examples

package main

import (
	"fmt"

	"github.com/mycalf/reader-go"
)

func main() {
	if doc, ok := reader.Load("http://www.163.com"); ok {
		fmt.Println(doc.HTML)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = struct {
	Timeout  time.Duration
	Browser  string
	Platform string
}{
	Timeout:  10,
	Browser:  "chrome",
	Platform: "MAC",
}

Config Struct... 系统配置

Functions

This section is empty.

Types

type Document

type Document struct {
	HTML  string
	Bytes []byte
	URL   string
	Resp  *gentleman.Response
}

Document Struct 内容结构 ...

func Load

func Load(url string, navigate ...bool) (*Document, bool)

Load Function 加载Web ...

func (*Document) Converter

func (doc *Document) Converter() (*Document, bool)

Converter Function 运行对当前进程进行编码转换成UTF-8 ...

func (*Document) NavigateHTTPClient

func (doc *Document) NavigateHTTPClient() (*Document, bool)

NavigateHTTPClient Function 系统桌面HTTP客户端 ...

func (*Document) TerminalHTTPClient

func (doc *Document) TerminalHTTPClient() (*Document, bool)

TerminalHTTPClient Funciton 命令行下HTTP客户端 ...

func (*Document) UTF8

func (doc *Document) UTF8() (*Document, bool)

UTF8 Funciton 转换为UTF8 ...

Jump to

Keyboard shortcuts

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