x-bookmarks: read the Bookmarks response from a logged-in browser instead of grepping for the queryId

オープン
#166 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github, shell

調査の方向性

Read bin/x-bookmarks.sh and bin/cookie-cadence.sh to understand the current fetch and credential handling. The issue proposes using a logged-in agent-browser profile to open x.com/i/bookmarks, capture the Bookmarks GraphQL response, and refresh auth_token and ct0; no tests or other entry points are named. Done means the fetch no longer depends on grepping the JS bundle and the profile can refresh credentials, with manual login still required after session expiry.

索引モデルが issue の本文から書いたものです。

説明

Parked - build this the next time the queryId grep breaks. The current fetcher is fine until then.

What breaks today

bin/x-bookmarks.sh finds the Bookmarks GraphQL queryId by grepping X's JS bundle. That grep is the only part that has failed: it was down 2026-09-05 to 09-14 after X renamed its webpack chunks. The cookies have never expired. bin/cookie-cadence.sh on 2026-10-29 says the credentials were written 2026-08-02 and have worked for 88 days, verdict "no cadence yet".

Part Failures seen
queryId grep of the JS bundle 10 nights (09-05 to 09-14)
Cookie pair (auth_token, ct0) none in 88 days

Proposal

Open x.com/i/bookmarks in a logged-in agent-browser profile (--profile) and read the Bookmarks GraphQL response off the network. X's own web app picks the queryId, so the bundle grep goes away.

The same profile can write auth_token and ct0 back to x-credentials with agent-browser cookies get. That keeps a live session fresh. It can't log back in unattended once X ends the session, because that takes a password, 2FA and getting past X's bot checks.

Costs:

  • a headless Chrome launch every night, in place of two curl calls
  • one manual login in headed Chrome to set up the profile
  • about 2 hours to build

Alternative

The official API through treg (x.x.get-users-bookmarks, $0.005 per result returned). That's about $3/mo at today's page size of 20, or about $0.75/mo if each fetch starts at max_results=5. It removes the cookies and the queryId grep, but it needs an X OAuth connection on the treg team.

主要言語
Shell
スター
0
フォーク
2
平均マージ
11時間 31分
マージ済み PR(30日)
26

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

STRML/autodream のほかの issue

STRML/autodream の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。