Documentation ¶
Index ¶
- Constants
- func GetRateLimitDuration() time.Duration
- func LoadCookies(scraper *twitterscraper.Scraper, account *TwitterAccount, baseDir string) error
- func RandomSleep()
- func SaveCookies(scraper *twitterscraper.Scraper, account *TwitterAccount, baseDir string) error
- func ScrapeFollowersForProfile(baseDir string, username string, count int) ([]*twitterscraper.Profile, error)
- func ScrapeTweetsProfile(baseDir string, username string) (twitterscraper.Profile, error)
- type Scraper
- type TweetResult
- type TwitterAccount
- type TwitterAccountManager
Constants ¶
View Source
const (
RateLimitDuration = 15 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
func GetRateLimitDuration ¶ added in v0.8.2
func LoadCookies ¶
func LoadCookies(scraper *twitterscraper.Scraper, account *TwitterAccount, baseDir string) error
func RandomSleep ¶ added in v0.8.4
func RandomSleep()
func SaveCookies ¶
func SaveCookies(scraper *twitterscraper.Scraper, account *TwitterAccount, baseDir string) error
func ScrapeTweetsProfile ¶
func ScrapeTweetsProfile(baseDir string, username string) (twitterscraper.Profile, error)
Types ¶
type Scraper ¶ added in v0.8.2
type Scraper struct {
*twitterscraper.Scraper
}
func NewScraper ¶ added in v0.8.2
func NewScraper(account *TwitterAccount, cookieDir string) *Scraper
func (*Scraper) IsLoggedIn ¶ added in v0.8.2
type TweetResult ¶ added in v0.5.1
type TweetResult struct { Tweet *twitterscraper.Tweet Error error }
func ScrapeTweetsByQuery ¶
func ScrapeTweetsByQuery(baseDir string, query string, count int) ([]*TweetResult, error)
type TwitterAccount ¶ added in v0.8.2
type TwitterAccountManager ¶ added in v0.8.2
type TwitterAccountManager struct {
// contains filtered or unexported fields
}
func NewTwitterAccountManager ¶ added in v0.8.2
func NewTwitterAccountManager(accounts []*TwitterAccount) *TwitterAccountManager
func (*TwitterAccountManager) GetNextAccount ¶ added in v0.8.2
func (manager *TwitterAccountManager) GetNextAccount() *TwitterAccount
func (*TwitterAccountManager) MarkAccountRateLimited ¶ added in v0.8.2
func (manager *TwitterAccountManager) MarkAccountRateLimited(account *TwitterAccount)
Click to show internal directories.
Click to hide internal directories.