feat: x.com migration + public API for cookie-based auth
- migrate all API URLs from twitter.com to x.com - add SetBearerToken, SetHTTPClient, SetLoggedIn public methods - accept 202/204 status codes in handleResponse - module path -> src.cultist.club/lain/twitter-scrapper
This commit is contained in:
parent
76cb95cd3e
commit
34db837a9e
19 changed files with 75 additions and 63 deletions
12
scraper.go
12
scraper.go
|
|
@ -180,3 +180,15 @@ func (s *Scraper) SetUserAgent(userAgent string) {
|
|||
func (s *Scraper) GetUserAgent() string {
|
||||
return s.userAgent
|
||||
}
|
||||
|
||||
func (s *Scraper) SetBearerToken(token string) {
|
||||
s.setBearerToken(token)
|
||||
}
|
||||
|
||||
func (s *Scraper) SetHTTPClient(client *http.Client) {
|
||||
s.client = client
|
||||
}
|
||||
|
||||
func (s *Scraper) SetLoggedIn(v bool) {
|
||||
s.isLogged = v
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue