github teng-lin/notebooklm-py v0.7.2

6 hours ago

Maintenance patch on the 0.7.x line. Backports fixes from main
(cherry-picked ahead of the v0.8.0 breaking release).

Fixed

  • Video Overview visual-style values corrected to match the live Web UI
    (#1594; backport of #1597). VideoStyle used stale numeric wire values, so
    several named styles (Whiteboard, Kawaii, Anime, Watercolor, Heritage,
    Paper-craft, Classic, Custom) serialized as the wrong style on the wire.
    Values now match live Web UI captures, and CUSTOM is encoded the Web-UI way
    (the style enum slot is omitted/defaulted and the custom visual-style prompt
    is appended). Note: this changes the integer values of VideoStyle
    members — code that passed the raw ints must update; passing the enum members
    (VideoStyle.WHITEBOARD, …) is unaffected.

  • Video (and other artifact) generation no longer fails immediately on
    cohorts that reject the legacy client-options shape
    (#1594; backport of
    #1583). CREATE_ARTIFACT sent a minimal param-0 of [2]; the live web
    client sends the fuller capability envelope
    ([2, null, null, [1, …, [1]], [[1, 4, 8, 2, 3, 6]]]). On some accounts the
    backend began rejecting the short form for video generation specifically —
    the artifact was created and then immediately marked failed, while audio and
    infographic (which the backend still accepted) kept working. All artifact
    builders (audio, video, cinematic video, report, quiz, flashcards) now send
    the full envelope, matching the browser. The VCR body matcher normalizes the
    old and new client-options shapes so existing generation cassettes still
    replay.

  • notebooks.create() and sources.add_url() no longer fail on
    already-migrated cohorts
    (#1548; backport of #1546). Google migrated the
    CREATE_NOTEBOOK (CCqFvf) and URL ADD_SOURCE (izAoDd) payloads to a nested
    wire shape during the gradual rollout: the flat trailing template block
    ([2],[1] for create; [2],None,None for url-add) collapsed into a nested
    [2, None, None, [1, …, [1]]] block, and the URL source spec gained a
    trailing 1. Backends on already-migrated accounts began rejecting the old
    flat shape (status=3 for create, 5/9 for add-source), while read paths
    were unaffected. Both payload builders now emit the nested shape, which is
    forward-compatible across migrated and un-migrated cohorts (verified live).
    Scope is limited to the create + add-url RPCs with exact Web-UI captures; the
    youtube/text/drive/file ADD_SOURCE variants are unchanged.

  • Empty notebook summary no longer raises UnknownRPCMethodError (#1485).
    A brand-new, source-less notebook has no summary yet, so the SUMMARIZE RPC
    returns an absent/None payload. notebooks.get_summary() and
    notebooks.get_description() now treat that routine "no summary yet" state as
    an empty summary ("") instead of mis-classifying it as wire-schema drift.
    Genuinely-malformed payloads (a present-but-non-list result[0], a scalar, or
    a string where a nested list is expected) still raise. get_summary now shares
    the _extract_summary descent with get_description, so both agree on every
    shape. As part of the fix, safe_index rejects a str/bytes value at an
    intermediate descent hop (it is indexable but never a valid container, so
    descending it would smuggle a single character past drift detection).

  • download <type> no longer exits 1 with no file written (#1488). The
    download path listed artifacts twice — the executor listed to select the
    target, then each per-type download re-listed to re-find it by id — so the
    second LIST_ARTIFACTS could not replay against a single-interaction VCR
    cassette and aborted the download. The executor now lists once and threads
    the already-fetched rows into the download method (which skips its redundant
    second list); studio downloads also no longer trigger the note-backed
    mind-map sub-fetch they never needed. Live behavior is unchanged for direct
    client.artifacts.download_*() calls.

Don't miss a new notebooklm-py release

NewReleases is sending notifications on new releases.