tonhowtf/omniget · error

não achei o id da sua conta na página de importação do…

Error message

não achei o id da sua conta na página de importação do Goodreads

What it means

After confirming the session is valid, trigger_and_wait extracts the Goodreads user id from the import page HTML via user_id(). The id is required to build the /review_porter/export/<id> URL. If the page HTML does not match the expected pattern, the library cannot proceed and returns this error.

Solutions

  1. Retry once — transient interstitials can produce a page without the id; then rerun.
  2. Capture fresh cookies via the extension (the signed-out check can pass on a partial page) and rerun.
  3. Check for an updated version of this tool — a Goodreads markup change requires updating the user_id() extraction pattern.
  4. Open goodreads.com/review/import in a browser and confirm the page loads normally (no bot challenge) before rerunning.

Example fix

// before: user_id() regex misses new markup
let uid = user_id(&page).ok_or_else(|| anyhow!(...))?;

// after: update extractor for new Goodreads markup
fn user_id(page: &str) -> Option<u64> {
    // match current attribute, e.g. data-user-id="12345"
    ...
}
Defensive patterns

Strategy: retry

Validate before calling

let page = fetcher.get_text(IMPORT_URL).await?;
if user_id(&page).is_none() {
    // fetch once more before giving up; interstitials happen
    let page = fetcher.get_text(IMPORT_URL).await?;
    anyhow::ensure!(user_id(&page).is_some(), "import page did not contain user id");
}

Try / catch

match run(&fetcher, &opts).await {
    Err(e) if e.to_string().contains("id da sua conta") => {
        warn_user_of_possible_goodreads_markup_change_and_report();
    }
    r => r?,
}

Prevention

When it happens

Trigger: user_id() returning None on a fetched import page: Goodreads changed their page markup/attributes embedding the user id, a localized/A-B-test variant of the page renders different HTML, or a partial/interstitial page was returned despite passing the signed-out check.

Common situations: Goodreads frontend redesign altering the data attribute or script blob containing the user id; page served in a different language/locale; bot-check or Cloudflare interstitial returned instead of the real page.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/de2708a2de63520f. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/lists/goodreads.rs:254

        }
    }
    None
}

/// Dispara o export e espera o CSV aparecer. Devolve `(csv, segundos)`.
///
/// O caminho é o mesmo do navegador: pegar o token anti-CSRF da página de
/// importação, mandar o POST em `/review_porter/export/<id>` e depois ficar
/// perguntando pelo arquivo, que responde 404 enquanto não fica pronto.
async fn trigger_and_wait(f: &Fetcher, opts: &Options, p: &ProgressFn) -> Result<(String, u64)> {
    let page = f.get_text(IMPORT_URL).await?;
    if is_signed_out(&page) {
        return Err(anyhow!(
            "a sessão do Goodreads não está válida: capture os cookies de goodreads.com na extensão"
        ));
    }
    let uid = user_id(&page).ok_or_else(|| {
        anyhow!("não achei o id da sua conta na página de importação do Goodreads")
    })?;
    let csv_url = export_csv_url(&uid);

    // Se já existe um export pronto, aproveita: o Goodreads só deixa gerar um
    // a cada poucos dias, e gerar um novo apaga o anterior.
    let ready = !opts.force && export_link(&page).is_some();
    let started = Instant::now();
    if !ready {
        let token = csrf_token(&page).ok_or_else(|| {
            anyhow!(
                "não achei o token anti-CSRF do Goodreads; recapture os cookies e tente de novo"
            )
        })?;
        f.pace().await;
        let resp = f
            .client()
            .post(export_post_url(&uid))
            .header(reqwest::header::REFERER, IMPORT_URL)

View on GitHub (pinned to 8600b91f42)