[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74224":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},74224,"zlibrary-to-notebooklm","zstmfhy\u002Fzlibrary-to-notebooklm","zstmfhy","一键将 Z-Library 书籍自动下载并上传到 Google NotebookLM",null,"Python",1636,183,4,0,7,12,42,21,78.99,"MIT License",false,"main",true,[],"2026-06-12 04:01:13","# 📚 Z-Library to NotebookLM\n\n[English](README.md) | [简体中文](README.zh-CN.md)\n\n> Automatically download books from Z-Library and upload them to Google NotebookLM with one command.\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Python 3.8+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![Claude Skill](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FClaude-Skill-success.svg)](https:\u002F\u002Fclaude.ai\u002Fclaude-code)\n\n---\n\n## ⚠️ Important Disclaimer\n\n**This project is for educational, research, and technical demonstration purposes only. Please strictly comply with local laws and copyright regulations. Use only for:**\n\n- ✅ Resources you have legal access to\n- ✅ Public domain or open-source licensed documents (e.g., arXiv, Project Gutenberg)\n- ✅ Content you personally own or have authorization to use\n\n**The author does not encourage or support any form of copyright infringement and assumes no legal liability. Use at your own risk.**\n\n**Please respect intellectual property rights and support authorized reading!**\n\n---\n\n## ✨ Features\n\n- 🔐 **One-time Login, Forever Use** - Similar to `notebooklm login` experience\n- 📥 **Smart Download** - Prioritizes PDF (preserves formatting), auto-fallback to EPUB → Markdown\n- 📦 **Smart Chunking** - Large files auto-split (>350k words) for reliable CLI upload\n- 🤖 **Fully Automated** - Complete workflow with a single command\n- 🎯 **Format Adaptive** - Automatically detects and processes multiple formats (PDF, EPUB, MOBI, etc.)\n- 📊 **Visual Progress** - Real-time display of download and conversion progress\n\n## 🎯 Use as Claude Skill (Recommended)\n\n### Installation\n\n```bash\n# 1. Navigate to Claude Skills directory\ncd ~\u002F.claude\u002Fskills  # Windows: %APPDATA%\\Claude\\skills\n\n# 2. Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fzstmfhy\u002Fzlibrary-to-notebooklm.git zlib-to-notebooklm\n\n# 3. Complete initial login\ncd zlib-to-notebooklm\npython3 scripts\u002Flogin.py\n```\n\n### Usage\n\nAfter installation, simply tell Claude Code:\n\n```text\nUse zlib-to-notebooklm skill to process this Z-Library link:\nhttps:\u002F\u002Fzh.zlib.li\u002Fbook\u002F25314781\u002Faa05a1\u002Fbook-title\n```\n\nClaude will automatically:\n\n- Download the book (prioritizing PDF)\n- Create NotebookLM notebook\n- Upload the file\n- Return notebook ID\n- Suggest follow-up questions\n\n---\n\n## 🛠️ Traditional Installation\n\n### 1. Install Dependencies\n\n```bash\n# Clone repository\ngit clone https:\u002F\u002Fgithub.com\u002Fzstmfhy\u002Fzlibrary-to-notebooklm.git\ncd zlibrary-to-notebooklm\n\n# Install Python dependencies\npip install playwright ebooklib\n\n# Install Playwright browser\nplaywright install chromium\n```\n\n### 2. Login to Z-Library (One-time Only)\n\n```bash\npython3 scripts\u002Flogin.py\n```\n\n**Steps:**\n1. Browser will automatically open and visit Z-Library\n2. Complete login in the browser\n3. Return to terminal and press **ENTER**\n4. Session saved!\n\n### 3. Download and Upload Books\n\n```bash\npython3 scripts\u002Fupload.py \"https:\u002F\u002Fzh.zlib.li\u002Fbook\u002F...\"\n```\n\n**Automatically completes:**\n\n- ✅ Login using saved session\n- ✅ Download PDF (preserves formatting)\n- ✅ Fallback to EPUB → Markdown\n- ✅ Smart chunking for large files (>350k words)\n- ✅ Create NotebookLM notebook\n- ✅ Upload content\n- ✅ Return notebook ID\n\n## 📖 Usage Examples\n\n### Basic Usage\n\n```bash\n# Download single book\npython3 scripts\u002Fupload.py \"https:\u002F\u002Fzh.zlib.li\u002Fbook\u002F12345\u002F...\"\n```\n\n### Batch Processing\n\n```bash\n# Batch download multiple books\nfor url in \"url1\" \"url2\" \"url3\"; do\n    python3 scripts\u002Fupload.py \"$url\"\ndone\n```\n\n### Using NotebookLM\n\n```bash\n# After upload, use the notebook\nnotebooklm use \u003Creturned-notebook-id>\n\n# Start asking questions\nnotebooklm ask \"What are the core concepts of this book?\"\nnotebooklm ask \"Summarize Chapter 3\"\n```\n\n## 🔄 Workflow\n\n```text\nZ-Library URL\n    ↓\n1. Launch browser (using saved session)\n    ↓\n2. Visit book page\n    ↓\n3. Smart format selection:\n   - Priority: PDF (preserves formatting)\n   - Fallback: EPUB (convert to Markdown)\n   - Other formats (auto-convert)\n    ↓\n4. Download to ~\u002FDownloads\n    ↓\n5. Format processing:\n   - PDF → Use directly\n   - EPUB → Convert to Markdown\n   - Check file size → Auto-chunk if >350k words\n    ↓\n6. Create NotebookLM notebook\n    ↓\n7. Upload content (chunked files uploaded individually)\n    ↓\n8. Return notebook ID ✅\n```\n\n## 📁 Project Structure\n\n```text\nzlibrary-to-notebooklm\u002F\n├── SKILL.md              # Core Skill definition (required)\n├── README.md             # Project documentation\n├── README.zh-CN.md       # Chinese documentation\n├── LICENSE               # MIT License\n├── package.json          # npm config (for Claude Code skill)\n├── skill.yaml            # Skill configuration\n├── requirements.txt      # Python dependencies\n├── scripts\u002F              # Executable scripts (official standard)\n│   ├── login.py         # Login script\n│   ├── upload.py        # Download + Upload script\n│   └── convert_epub.py  # EPUB conversion tool\n├── docs\u002F                 # Documentation\n│   ├── WORKFLOW.md      # Workflow details\n│   └── TROUBLESHOOTING.md # Troubleshooting guide\n└── INSTALL.md            # Installation guide\n```\n\n## 🔧 Configuration\n\nAll configurations are saved in `~\u002F.zlibrary\u002F` directory:\n\n```text\n~\u002F.zlibrary\u002F\n├── storage_state.json    # Login session (cookies)\n├── browser_profile\u002F      # Browser data\n└── config.json          # Account config (backup)\n```\n\n## 🛠️ Dependencies\n\n- **Python 3.8+**\n- **playwright** - Browser automation\n- **ebooklib** - EPUB file processing\n- **NotebookLM CLI** - Google NotebookLM command-line tool\n\n## 📝 Command Reference\n\n### Login\n\n```bash\npython3 scripts\u002Flogin.py\n```\n\n### Upload\n\n```bash\npython3 scripts\u002Fupload.py \u003CZ-Library URL>\n```\n\n### Check Session Status\n\n```bash\nls -lh ~\u002F.zlibrary\u002Fstorage_state.json\n```\n\n### Re-login\n\n```bash\nrm ~\u002F.zlibrary\u002Fstorage_state.json\npython3 scripts\u002Flogin.py\n```\n\n## 📊 NotebookLM Limits\n\nThis project is optimized for NotebookLM's actual limitations:\n\n### Official Limits\n- **File Size**: 200MB per file\n- **Words per Source**: 500,000 words\n\n### Practical Recommendations (CLI Tool)\n- **Safe Word Count**: Maximum 350,000-380,000 words per file\n- **Reason**: NotebookLM CLI tool has timeout and API limitations with large files\n\n### Our Solution\n✅ **Automatic File Chunking**:\n- When EPUB is converted to Markdown, the script automatically detects word count\n- Files exceeding 350,000 words are automatically split into multiple smaller files\n- Each chunk is uploaded individually to the same NotebookLM notebook\n- Smart chapter-based splitting preserves content integrity\n\n**Example**:\n```bash\n📊 Word count: 2,700,000\n⚠️  File exceeds 350k words (NotebookLM CLI limit)\n📊 File too large, starting split...\n   Total words: 2,700,000\n   Max per chunk: 350,000 words\n   ✅ Part 1\u002F8: 342,000 words\n   ✅ Part 2\u002F8: 338,000 words\n   ...\n📦 Detected 8 file chunks\n```\n\n### Why 350k Words?\n- Official limit is 500k words, but CLI tools tend to timeout near this limit\n- 350k words is a tested safe value for reliable uploads\n- Web interface can handle larger files directly, but CLI tools require chunking\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature\u002FAmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature\u002FAmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## 🙏 Acknowledgments\n\n- [Z-Library](https:\u002F\u002Fzh.zlib.li\u002F) - World's largest digital library\n- [Google NotebookLM](https:\u002F\u002Fnotebooklm.google.com\u002F) - AI-powered note-taking tool\n- [Playwright](https:\u002F\u002Fplaywright.dev\u002F) - Powerful browser automation tool\n\n## 📮 Contact\n\n- GitHub Issues: [Submit issues](https:\u002F\u002Fgithub.com\u002Fzstmfhy\u002Fzlibrary-to-notebooklm\u002Fissues)\n- Discussions: [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Fzstmfhy\u002Fzlibrary-to-notebooklm\u002Fdiscussions)\n\n---\n\n**⭐ If this project helps you, please give it a Star!**\n","zstmfhy\u002Fzlibrary-to-notebooklm 项目能够一键将 Z-Library 上的书籍自动下载并上传到 Google NotebookLM。其核心功能包括智能下载（优先选择PDF格式，其次是EPUB和Markdown）、智能分块处理（大文件自动分割以确保可靠上传）、全自动工作流程以及多格式支持（PDF、EPUB、MOBI等）。用户只需通过一个命令即可完成整个过程，并且可以实时查看进度。该项目适用于需要快速获取电子书资源并将其整合到个人笔记系统的场景，特别适合研究人员或学生用于资料整理与学习。此外，它还支持作为 Claude 技能使用，进一步简化操作步骤。",2,"2026-06-11 03:49:34","high_star"]