Documentation
¶
Overview ¶
Package twitter fetches Twitter/X user profile data using authenticated session cookies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRequired ¶
func AuthRequired() bool
AuthRequired returns true because Twitter requires authentication.
func IsValidProfileURL ¶
IsValidProfileURL validates that a Twitter/X URL points to an actual user profile, filtering out system pages, language codes, and invalid usernames.
func IsValidUsername ¶
IsValidUsername validates a Twitter username against platform requirements. Twitter usernames must be 1-15 characters and contain only alphanumeric or underscore.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles Twitter/X requests with authenticated cookies.
type Option ¶
type Option func(*config)
Option configures a Client.
func WithBrowserCookies ¶
func WithBrowserCookies() Option
WithBrowserCookies enables reading cookies from browser stores.
func WithCookies ¶
WithCookies sets explicit cookie values.
func WithHTTPCache ¶
WithHTTPCache sets the HTTP cache.