sync

package
v0.0.0-...-15eb0b2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FavAPI         = "https://weibo.com/ajax/favorites/all_fav?uid=%s&page=%d"
	UserTweetsAPI  = "https://weibo.com/ajax/statuses/mymblog?uid=%s&page=%d"
	UserProfileAPI = "https://weibo.com/ajax/profile/info?uid=%s"
)

Variables

This section is empty.

Functions

func FetchLongTextIfNeeded

func FetchLongTextIfNeeded(cli *common.HttpCli, item pkg.Item) error

func FetchVideoIfNeeded

func FetchVideoIfNeeded(cli *common.HttpCli, item pkg.Item, vq common.VideoQuality) ([]byte, error)

FetchVideoIfNeeded try parse video in doc It returns (nil, nil) when there is no video or return video content and nil error

func GetImages

func GetImages(cli *common.HttpCli, rcs map[string]resource) (pkg.Resources, error)

Types

type Sync

type Sync struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, ns pkg.Namespace, config common.SyncerConfig) (*Sync, error)

New Sync instance with db ns and its configuration

func (*Sync) Accept

func (s *Sync) Accept(cookie string)

func (*Sync) Start

func (s *Sync) Start()

Jump to

Keyboard shortcuts

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