DIYgod mirror
Go to file
Guorui Yu d8eaee5889
fix(route/twitter): dynamically resolve GraphQL query IDs and fix production CookieAgent (#21544)
* fix(route/twitter): dynamically resolve GraphQL query IDs from Twitter JS bundles

Twitter rotates GraphQL query IDs every 2-4 weeks, causing 404 errors.
Instead of relying solely on hardcoded IDs, fetch and cache the latest
query IDs from Twitter's client-web main.js bundle at runtime.

- Add gql-id-resolver module to extract queryId/operationName pairs
- Cache resolved IDs using CACHE_CONTENT_EXPIRE (Redis supported)
- Fall back to hardcoded IDs if dynamic resolution fails
- Update init() to trigger resolution before first API call

Signed-off-by: yuguorui <yuguorui@pku.edu.cn>

* fix(route/twitter): use undici.fetch directly to preserve CookieAgent dispatcher

Both ofetch and the global wrappedFetch (request-rewriter) drop the
dispatcher option when constructing a new Request object, which prevents
the CookieAgent from attaching cookies in production builds. Use
undici.fetch directly for Twitter API requests to preserve the dispatcher.

Signed-off-by: yuguorui <yuguorui@pku.edu.cn>

---------

Signed-off-by: yuguorui <yuguorui@pku.edu.cn>
2026-04-06 22:46:29 +08:00
.devcontainer chore: migrate to oxfmt (#20735) 2026-01-13 00:06:06 +08:00
.github chore(deps): bump fastify/github-action-merge-dependabot (#21627) 2026-04-06 18:59:46 +08:00
.husky
.idx chore: migrate to oxfmt (#20735) 2026-01-13 00:06:06 +08:00
assets
eslint-plugins style: migrate eslint to oxlint (#21224) 2026-02-28 21:23:11 +08:00
lib fix(route/twitter): dynamically resolve GraphQL query IDs and fix production CookieAgent (#21544) 2026-04-06 22:46:29 +08:00
logs
patches fix: update rss-parser patch to support other compressions (#21561) 2026-03-30 22:22:24 +00:00
public
scripts chore: use mdast for route identification script 2026-03-13 19:57:27 +08:00
.codecov.yml
.dockerignore chore: migrate to oxfmt (#20735) 2026-01-13 00:06:06 +08:00
.editorconfig
.envrc fix(.envrc): add --no-pure-eval for devenv flake compatibility (#20692) 2025-12-19 00:00:46 +08:00
.gitignore feat: add Cloudflare Containers deployment support (#20932) 2026-01-20 15:29:13 +08:00
.npmrc
.oxfmtrc.json style: migrate eslint to oxlint (#21224) 2026-02-28 21:23:11 +08:00
.oxlintrc.json style: use oxlint-plugin-eslint for unimplemented eslint rules 2026-04-02 05:29:27 +08:00
.puppeteerrc.cjs
AGENTS.md docs: add review guidelines for codex 2025-12-29 17:42:03 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile
LICENSE docs: update license file 2025-12-28 18:42:39 +08:00
README.md fix(README): update image link 2026-03-17 16:00:00 +08:00
SECURITY.md
app.json
devenv.nix chore: add Nix flake and NixOS module support (#20597) 2025-12-09 19:43:06 +08:00
docker-compose.yml feat: redirect `/picnob` to `/picnob.info` 2026-03-11 02:03:34 +08:00
eslint.config.mjs style: use oxlint-plugin-eslint for unimplemented eslint rules 2026-04-02 05:29:27 +08:00
flake.lock chore: add Nix flake and NixOS module support (#20597) 2025-12-09 19:43:06 +08:00
flake.nix chore(nix): modernize pnpm packaging and hash automation (#21259) 2026-03-03 06:34:18 +08:00
fly.toml
package.json chore(deps-dev): bump eslint from 10.1.0 to 10.2.0 in the eslint group (#21628) 2026-04-06 19:28:15 +08:00
pnpm-lock.yaml chore(deps-dev): bump eslint from 10.1.0 to 10.2.0 in the eslint group (#21628) 2026-04-06 19:28:15 +08:00
tailwind.config.js
tsconfig.json
tsdown-container.config.ts chore: rename again `inlineOnly` -> `deps.onlyAllowBundle` -> `deps.onlyBundle` 2026-03-16 18:24:08 +08:00
tsdown-lib.config.ts chore: rename again `inlineOnly` -> `deps.onlyAllowBundle` -> `deps.onlyBundle` 2026-03-16 18:24:08 +08:00
tsdown-vercel.config.ts chore: rename again `inlineOnly` -> `deps.onlyAllowBundle` -> `deps.onlyBundle` 2026-03-16 18:24:08 +08:00
tsdown-worker.config.ts feat(core): add honeybadger support (#21574) 2026-04-01 01:10:12 +08:00
tsdown.config.ts chore: rename again `inlineOnly` -> `deps.onlyAllowBundle` -> `deps.onlyBundle` 2026-03-16 18:24:08 +08:00
vercel.json chore: unpin jsdom (#21505) 2026-03-25 23:16:40 +08:00
vitest.config.ts chore(deps): bump pnpm to v10.27.0 2026-01-07 12:52:21 +08:00
wrangler-container.toml feat: add Cloudflare Containers deployment support (#20932) 2026-01-20 15:29:13 +08:00
wrangler.toml refactor: deploy all routes to Cloudflare Workers (#20809) 2026-01-04 17:33:55 +08:00

README.md

RSSHub

RSSHub

🧡 Everything is RSSible

docker publish npm publish test Test coverage Visitors

Telegram group Telegram channel X (Twitter)

Introduction

RSSHub is the world's largest RSS network, consisting of over 5,000 global instances.

RSSHub delivers millions of contents aggregated from all kinds of sources, our vibrant open source community is ensuring the deliver of RSSHub's new routes, new features and bug fixes.

RSSHub pairs especially well with Folo, an AI RSS reader for feed discovery and modern reading workflows. The project is also open source on GitHub.

Documentation | Folo | Telegram Group | Telegram Channel | X (Twitter)

  • Folo | An AI RSS reader that works especially well with RSSHub. Source code: GitHub.
  • RSSHub Radar | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites.
  • RSSBud | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization.
  • RSSAid | RSSHub Radar for Android platform built with Flutter.
  • DocSearch | Link RSSHub DocSearch into Raycast.
  • Awesome RSSHub Routes | Curated list of RSS feeds and RSSHub routes.

Contribute

We welcome all pull requests. Suggestions and feedback are also welcomed here.

Refer to Quick Start

Deployment

Refer to Deployment

Special Thanks

Logo designer sheldonrrr

              

Author

RSSHub © DIYgod, Released under the AGPL-3.0 License.
Authored and maintained by DIYgod with help from contributors (list).

Blog @DIYgod · GitHub @DIYgod · X (Twitter) @DIYgod · Telegram Channel @awesomeDIYgod