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
|
|
@ -46,7 +46,7 @@ type AccountList struct {
|
|||
|
||||
func (s *Scraper) GetAccountSettings() (AccountSettings, error) {
|
||||
var settings AccountSettings
|
||||
req, err := s.newRequest("GET", "https://api.twitter.com/1.1/account/settings.json")
|
||||
req, err := s.newRequest("GET", "https://api.x.com/1.1/account/settings.json")
|
||||
if err != nil {
|
||||
return settings, err
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ func (s *Scraper) GetAccountSettings() (AccountSettings, error) {
|
|||
|
||||
func (s *Scraper) GetAccountList() ([]Account, error) {
|
||||
var list AccountList
|
||||
req, err := s.newRequest("GET", "https://api.twitter.com/1.1/account/multi/list.json")
|
||||
req, err := s.newRequest("GET", "https://api.x.com/1.1/account/multi/list.json")
|
||||
if err != nil {
|
||||
return list.Users, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue