request

package
v0.0.0-...-e168591 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCatListFromNodeJS

func GetCatListFromNodeJS(ur string) ([]string, error)

GetCatListFromNodeJS http reques from node.js and parse

func GetPagesFromNodeJS

func GetPagesFromNodeJS(ur string) (string, int, string, error)
GetPagesFromNodeJS http reques from node.js and parse

** http://127.0.0.1:8001/szlcscpages?keyword=http://www.szlcsc.com/catalog/924.html ** ur = http://www.szlcsc.com/catalog/924.html

func StanHTTPGetURL

func StanHTTPGetURL(ur string) ([]byte, error)

StanHTTPGetURL go request url use http get.

Types

type CatsResponse

type CatsResponse struct {
	Status  int      `json:"status"`
	Keyword string   `json:"keyword"`
	Cats    []string `json:"cats"`
}

CatsResponse json response from ndoe.js struct

type PageResponse

type PageResponse struct {
	Status  int    `json:"status"`
	Pagemax int    `json:"pagemax"`
	Purl    string `json:"preurl"`
	Surl    string `json:"suxurl"`
}

PageResponse json response from ndoe.js struct

type PartNumber

type PartNumber struct {
	Status     int       `json:"status"`
	Keyword    string    `json:"keyword"`
	Steps      []int64   `json:"steps"`
	Prices     []float64 `json:"prices"`
	Part       string    `json:"part"`
	Promaf     string    `json:"pro_maf"`
	Stock      int64     `json:"stock"`
	Cat        string    `json:"pro_cat"`
	Detail     string    `json:"pro_detail"`
	Pkg        string    `json:"pro_pkg"`
	Desc       string    `json:"pro_desc"`
	YuanPan    int64     `json:"yuanpan"`
	RecentSell int64     `json:"recentsell"`
	Icode      string    `json:"pro_icode"`
}

PartNumber str

type PartNumberResponse

type PartNumberResponse struct {
	Status      int          `json:"status"`
	Keyword     string       `json:"pagemax"`
	PartNumbers []PartNumber `json:"data"`
}

PartNumberResponse part

Jump to

Keyboard shortcuts

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