refactor auth api

This commit is contained in:
Valentine 2024-10-01 01:30:08 +03:00
parent 2de5a50e74
commit f257b131ff
3 changed files with 71 additions and 31 deletions

View file

@ -84,7 +84,7 @@ func (s *Scraper) getFlow(data map[string]interface{}) (*flow, error) {
headers := http.Header{
"Authorization": []string{"Bearer " + s.bearerToken},
"Content-Type": []string{"application/json"},
"User-Agent": []string{"TwitterAndroid/99"},
"User-Agent": []string{s.userAgent},
"X-Guest-Token": []string{s.guestToken},
"X-Twitter-Auth-Type": []string{"OAuth2Client"},
"X-Twitter-Active-User": []string{"yes"},