Extend scanning window from 30 to 90 days

Author: SszmentorCreated Mar 24, 2026Updated Sep 22, 2026

Goal

Allow --days up to 90 for pre-event deep research (currently hard-capped at 30).

Changes required

1. Argparse validation (BLOCKING)

File: scripts/last30days.py:1458

python
# OLD
choices=range(1, 31),
help="Number of days to look back (1-30, default: 30)",

# NEW
choices=range(1, 91),
help="Number of days to look back (1-90, default: 30)",

2. Recency scoring — propagate max_days

File: scripts/lib/dates.py:110 — already parameterized (good), default stays 30.

File: scripts/lib/score.py — ALL 10 score_* functions need max_days: int = 30 parameter, passed to dates.recency_score(item.date, max_days=max_days):

  • score_reddit_items (line 120, call at 148)
  • score_x_items (line 185, call at 208)
  • score_youtube_items (line 264, call at 277)
  • score_tiktok_items (line 323, call at 336)
  • score_instagram_items (line 382, call at 395)
  • score_hackernews_items (line 440, call at 453)
  • score_bluesky_items (line 500, call at 513)
  • score_truthsocial_items (line 559, call at 569)
  • score_polymarket_items (line 614, call at 627)
  • score_websearch_items (line 654, call at 677)

Each function signature: add max_days: int = 30 as last parameter. Each dates.recency_score(item.date) call: change to dates.recency_score(item.date, max_days=max_days).

3. Callers of score_* functions

Find all call sites of score_reddit_items(), score_x_items(), etc. in last30days.py and pass max_days=args.days.

4. Reddit ScrapeCreators timeframe

File: scripts/lib/reddit.py:30-48 For deep depth config, change "timeframe": "month" to "timeframe": "year" when days > 30. This requires the days parameter to be accessible in the reddit module. Options:

  • Pass days to the reddit search function
  • Or add a timeframe override parameter

5. Tests

  • Update any tests that validate --days range
  • Add test: --days 90 accepted by argparse
  • Add test: recency_score("2026-01-01", max_days=90) returns >0 for 60-day-old items
  • Add test: Reddit timeframe uses "year" when days > 30

Notes

  • Default stays 30 days (backward compatible)
  • Polymarket Gamma API, HN Algolia, YouTube yt-dlp all support arbitrary date ranges
  • X/xAI search window may be limited — document if so

Source: mvanhorn/last30days-skill