Skip to content

chore: sync with upstream zedeus/nitter (40 commits) #23

@guanbinrui

Description

@guanbinrui

Upstream Sync — 2026-05-21

Merged 40 commits from zedeus/nitter (base: 51b5485).

What Changed Upstream

New Features

  • Broadcasts (src/routes/broadcast.nim, src/views/broadcast.nim): Twitter Space/Live broadcast page support.
  • Account Info (src/views/about_account.nim): "About this account" section with join date, verified status, username history, affiliate labels.
  • Mixed-media tweet support (src/types.nim): Old gif/video/photos fields unified into media: MediaEntities.
  • Media grid and gallery views (src/sass/timeline.scss): Grid/gallery layout for /media tab.
  • Community notes (src/views/tweet.nim, src/views/rss.nimf): Display + RSS support.
  • Full tweet edit history (src/routes/status.nim): Browseable edit history.
  • Preference URL params (src/routes/router_utils.nim): ?prefs=key=val,… support.
  • Sticky navbar preference (src/prefs_impl.nim).
  • Image/GIF alt text (src/types.nim, src/views/tweet.nim).
  • AI/Ad tweet disclosures (isAd, isAI fields on Tweet).
  • HDR video prevention (dynamic-range-limit CSS).

Bug Fixes

  • Fix segfault in parser
  • Fix null legacy tweet crash
  • Fix search repeating at end
  • Fix incorrect multi-user search query
  • Fix video thumbnails not loading
  • Fix "Replying to" parsing
  • Fix mobile gallery and grid
  • Fix broken "until" search filter (workaround)
  • Fix verified type enum parsing error

Configuration Changes

Old New
enableRSS = true (single flag) Master switch + 5 granular flags: enableRSSUserTweets/Replies/Media/Search/List
maxRetries, retryDelayMs (configurable retry logic)
maxConcurrentReqs (was hardcoded)

CI / Tooling

  • GitHub Actions updated to use ubuntu-24.04 runners
  • Tests migrated to poetry / pyproject.toml
  • New bulk session script: tools/create_sessions_browser.py

Impact on Our JSON API Layer

Area Before After
Media fields tweet.gif, tweet.gifs, tweet.video, tweet.photos tweet.media: MediaEntities with helpers getPhotos/getVideos/hasGifs
Photos response "photos": ["url", ...] "photos": [{"url":"...", "altText":"..."}] ⚠️ breaking
Videos response "video": {...} (single) "videos": [{...}] (array) ⚠️ breaking
Prefs helper cookiePrefs() requestPrefs()
getQuery() (request, tab, name) (request, tab, name, prefs)
RSS config cfg.enableRss cfg.enableRSSUserTweets/…

Files updated: src/jsons/timeline.nim, src/jsons/search.nim

⚠️ Breaking Changes in API Response Schema

  1. photos is now {url, altText}[] instead of string[]
  2. video (single optional) replaced by videos (array) — supports multi-video tweets
  3. Single gif field removed; use gifs array

Verification

  • All 10 merge conflicts resolved
  • nimble build succeeds — binary produced, only [UnusedImport] warnings
  • All JSON API routes preserved
  • enableJsonApi config flag preserved
  • Broadcast route registered in nitter.nim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions