Update CHANGELOG.txt for v0.6.16

This commit is contained in:
Alessio 2024-09-03 18:36:23 -07:00
parent 667b54503d
commit b9e025589e
4 changed files with 7 additions and 2 deletions

View File

@ -341,3 +341,8 @@ v0.6.15
- BUGFIX: `webserver` subcommand now respects the `--session` flag
- More types of scraping errors now show toasts in the UI: rate limiting, expired session
- New `--delay` flag added to introduce a delay in paginated scrapes
v0.6.16
-------
- Add notifications

View File

@ -315,7 +315,7 @@ func fetch_tweet_only(tweet_identifier string) {
}
tweet, err := api.GetTweet(tweet_id)
if is_scrape_failure(err) {
if is_scrape_failure(err) || errors.Is(err, scraper.ErrRateLimited) {
die(fmt.Sprintf("Error fetching tweet: %s", err.Error()), false, -1)
}
log.Debug(tweet)

View File

@ -27,7 +27,6 @@ TODO twitter-spaces
TODO authenticated-requests
- media tab
- quote-tweets
- notifications
TODO post-tweets
- post tweets

View File

@ -256,6 +256,7 @@ func (api *API) do_http(remote_url string, cursor string, result interface{}) er
if resp.StatusCode == 429 {
// "Too many requests" => rate limited
log.Warn("HTTP 429")
reset_at := TimestampFromUnix(int64(int_or_panic(resp.Header.Get("X-Rate-Limit-Reset"))))
return fmt.Errorf("%w (resets at %d, which is in %s)", ErrRateLimited, reset_at.Unix(), time.Until(reset_at.Time).String())
}