From 351be76e2942433e5d47d51804aebd93e4b73bbf Mon Sep 17 00:00:00 2001 From: Jawad Margieh Date: Thu, 15 Oct 2026 22:51:26 +0300 Subject: [PATCH] fix: fetch x.com/i/jf/ for ClientTransaction init after Vite migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit x.com/home now serves a new Vite-bundled app (x-web) that no longer contains the ondemand.s chunk map, INDICES pattern, or twitter-site-verification meta tag required by xclienttransaction. Fetching https://x.com/i/jf/ instead still returns the legacy responsive-web HTML structure, fixing ClientTransaction init and restoring x-client-transaction-id header generation — which Twitter's GraphQL API now requires for search and other endpoints. Ref: https://github.com/iSarabjitDhiman/XClientTransaction/issues/47 Ref: https://github.com/iSarabjitDhiman/XClientTransaction/pull/48 --- twitter_cli/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitter_cli/client.py b/twitter_cli/client.py index 0436c8e..f507fb2 100644 --- a/twitter_cli/client.py +++ b/twitter_cli/client.py @@ -1104,7 +1104,7 @@ def _ensure_client_transaction(self): cffi_session = _get_cffi_session() ct_headers = _gen_ct_headers() home_page = cffi_session.get( - "https://x.com", headers=ct_headers, timeout=10, + "https://x.com/i/jf/", headers=ct_headers, timeout=10, ) home_page_response = bs4.BeautifulSoup(home_page.content, "html.parser") ondemand_url = get_ondemand_file_url(response=home_page_response)