scraper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUserTweetsParams

func BuildUserTweetsParams(userID string, count int) (url.Values, error)

func FetchUserID

func FetchUserID(cl *http.Client, cf *config.EssentialsConfig, usr string) (string, error)

func FetchUserTweetsPage

func FetchUserTweetsPage(
	ctx context.Context,
	client *http.Client,
	conf *config.EssentialsConfig,
	userID string,
	count int,
) (*httpx.Response, error)

func WalkUserMediaPages

func WalkUserMediaPages(
	cl *http.Client,
	cf *config.EssentialsConfig,
	uid string,
	sn string,
	vb bool,
	lim *xruntime.Limiter,
	handler PageHandler,
) error

Types

type Media

type Media struct {
	URL     string `json:"url"`
	Type    string `json:"type"` // "image" or "video"
	TweetID string `json:"tweet_id,omitempty"`
}

func EnrichMediaWithTweetDetail

func EnrichMediaWithTweetDetail(
	cl *http.Client,
	cf *config.EssentialsConfig,
	screenName string,
	medias []Media,
	lim *xruntime.Limiter,
	vb bool,
) []Media

func GetHighQualityMediaForTweet

func GetHighQualityMediaForTweet(
	cl *http.Client,
	cf *config.EssentialsConfig,
	tweetID string,
	vb bool,
	lim *xruntime.Limiter,
) ([]Media, error)

func GetMediaLinksForUser

func GetMediaLinksForUser(cl *http.Client, cf *config.EssentialsConfig, uid string, sn string, vb bool, lim *xruntime.Limiter) ([]Media, error)

type PageHandler

type PageHandler func(page int, cursor string, medias []Media) error

type UserTweetsVariables

type UserTweetsVariables struct {
	UserID                            string `json:"userId"`
	Count                             int    `json:"count"`
	IncludePromotedContent            bool   `json:"includePromotedContent"`
	WithQuickPromoteEligibilityFields bool   `json:"withQuickPromoteEligibilityTweetFields"`
	WithVoice                         bool   `json:"withVoice"`
}

Jump to

Keyboard shortcuts

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