idootop / idootop/mi-note-export
獲取cookies失敗
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
我按照issues #4 教程獲取cookies,但是實際使用時顯示過期(我已經重新登入過取得最新cookies)
錯誤報告如下:
(base) D:\james\Documents\GitHub\mi_note_backup\mi-note-export>docker run -it --rm --env-file "%cd%/env" -v "%cd%/public/data:/app/public/data" idootop/mi-note-sync:latest
🚗 开始同步笔记
🔥 获取笔记列表中...
731 | const res = await get(`https://i.mi.com/note/full/page/?ts=${Date.now()}&limit=${limit}&syncTag=${syncTag}`);
732 | if (!res?.data?.entries) {
733 | const divider = "-----------------------------------------------------------------------";
734 | const tips = `\n${divider}\n👉 获取 Cookie 教程: https://github.com/idootop/mi-note-export/issues/4\n${divider}`;
735 | if (!process.env.MI_COOKIE || process.env.MI_COOKIE.startsWith("xxx")) throw new Error(`❌ Cookie 未设置,请在 env 文件中设置 MI_COOKIE 后重试。${tips}`);
736 | throw new Error(`获取笔记列表失败 ${syncTag}\n❌ 当前 Cookie 无效或已过期,请更新 Cookie 后重试。${tips}`);
^
error: 获取笔记列表失败
❌ 当前 Cookie 无效或已过期,请更新 Cookie 后重试。
-----------------------------------------------------------------------
👉 获取 Cookie 教程: https://github.com/idootop/mi-note-export/issues/4
-----------------------------------------------------------------------
at getNoteList (/app/sync.js:736:13)
at async getNoteEntries (/app/sync.js:802:21)
at async <anonymous> (/app/sync.js:825:37)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at sync.js lines 731-736, where getNoteList rejects the cookie, then compare the reported Docker invocation with the cookie instructions in issue #4. Reproduce the failure with a current cookie and trace the request response; done means the sync can retrieve the note list or reports a precise, actionable cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100