Documentation
¶
Overview ¶
Package douyin is the library behind the douyin command: the HTTP client, request shaping, and the typed data models for Douyin (抖音) hot search.
The client fetches trending topics from the public iesdouyin API at https://www.iesdouyin.com/web/api/v2/hotsearch/billboard/word/. No authentication is required. It sets a real browser User-Agent (the API is UA-sensitive), paces requests, and retries transient 429/5xx errors with exponential backoff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to the Douyin iesdouyin API.
type Config ¶
type Config struct {
BaseURL string
UserAgent string
Rate time.Duration
Retries int
Timeout time.Duration
}
Config holds constructor parameters for Client.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns sensible defaults. The UserAgent mimics a real browser because iesdouyin returns errors on non-browser UAs.