Skip to content

Add experimental Bilibili Playwright synchronization - #2

Merged
Arcueid77 merged 16 commits into
mainfrom
dev/bilibili-playwright-adapter
Dec 1, 2026
Merged

Arcueid77 merged 16 commits into
mainfrom
dev/bilibili-playwright-adapter

Conversation

@Arcueid77

@Arcueid77 Arcueid77 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Adds an opt-in Bilibili adapter alongside Zhihu, using a dedicated Playwright web session and native editor operations. Zhihu remains the default; Bilibili publication is disabled in the example.

The adapter persists allocation intent and exact draft IDs, reuses those IDs on reruns, and independently reopens saved drafts for content and formatting checks. It supports the modern creator iframe and actual inventory/draft response schemas, captures native image upload acknowledgements, and uses the editor's own image clipboard format to preserve uploaded image identity and captions. Inline code uses the native gray text highlight; code blocks retain indentation, tables expand into rows, and navigation uses confirmed same-platform public URLs. A durable QR login helper saves only the manually selected Bilibili session outside Git and does not upload credentials.

Validation on head 5d46a1f:

  • 73 unit tests and 32 Chromium fixture tests passed locally, including modern iframe hydration, wrong-ID rejection, native file upload, caption preservation, and image reuse.
  • Real-account 0x00 draft creation and same-ID rewrite passed on draft 386062. A deliberate draft-only text marker was overwritten from committed blog content, then an independent server-backed read matched all 11 comparison checks.
  • A real image was uploaded through the native chooser; image/caption save and independent reopen passed. Reusing the uploaded image caused zero additional upload requests. The temporary image was then removed by restoring the original image-free 0x00.
  • The standalone CLI verified committed blog revision e39ae3187b24d11de962ea594fa6bf4faa41e8a4 in a fresh headless browser and returned draft_current.

Remaining gates: public publication, the modern publication form, review/public URL reconciliation, updates to already published Bilibili articles, and authenticated GitHub-hosted runner operation remain unverified. Draft article_id values are never guessed into public cv/opus URLs. Keep allowPublish false. No public Bilibili article has been submitted, and the saved session remains local. This PR stays a draft; the production blog/Zhihu Action pin is unchanged.

@Arcueid77
Arcueid77 merged commit 3b1beec into main Dec 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant