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

Abierto
#166 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github, shell

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Shell
Estrellas
0
Forks
2
Merge medio
11 h 31 min
PR fusionados (30 d)
26

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de STRML/autodream

Todos los issues de STRML/autodream

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.