9b395f5cc3
E2E Headed Chrome / e2e-headed (macos-15) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (ubuntu-latest) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / unit-test (push) Has been cancelled
CI / bun-test (push) Has been cancelled
CI / adapter-test (push) Has been cancelled
CI / smoke-test (macos-latest) (push) Has been cancelled
CI / smoke-test (ubuntu-latest) (push) Has been cancelled
Security Audit / audit (push) Has been cancelled
Build Chrome Extension / build (push) Has been cancelled
Trigger Website Rebuild (Docs Updated) / dispatch (push) Has been cancelled
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
/**
|
|
* Rednote home feed — delegates to the shared func-mode store read in
|
|
* xiaohongshu/feed.js, run against www.rednote.com.
|
|
*
|
|
* The store read and URL-signing logic are identical to xiaohongshu (both
|
|
* hydrate a Pinia `feed` store whose entries carry `xsecToken`), so this
|
|
* adapter only pins the web host. Mirrors how rednote's note/comments/search/
|
|
* download/user adapters reuse the xiaohongshu implementations.
|
|
*/
|
|
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
import { runFeed } from '../xiaohongshu/feed.js';
|
|
|
|
export const command = cli({
|
|
site: 'rednote',
|
|
name: 'feed',
|
|
access: 'read',
|
|
description: 'Rednote home feed (reads hydrated Pinia store)',
|
|
domain: 'www.rednote.com',
|
|
strategy: Strategy.COOKIE,
|
|
browser: true,
|
|
navigateBefore: false,
|
|
args: [
|
|
{ name: 'limit', type: 'int', default: 20, help: 'Number of items to return' },
|
|
],
|
|
columns: ['id', 'title', 'author', 'likes', 'type', 'url'],
|
|
func: async (page, kwargs) => runFeed(page, kwargs, 'www.rednote.com'),
|
|
});
|