{"id":42647415,"url":"https://github.com/venenosix24/igolib-ldu","last_synced_at":"2026-01-29T07:01:38.035Z","repository":{"id":289104052,"uuid":"970136667","full_name":"VenenoSix24/igolib-ldu","owner":"VenenoSix24","description":"基于Python、FastAPI和Jinja2实现的我去图书馆抢座/预约系统","archived":false,"fork":false,"pushed_at":"2026-01-22T15:29:40.000Z","size":693,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"manual-web","last_synced_at":"2026-01-23T08:34:44.891Z","etag":null,"topics":["fastapi","jinja2","library","python"],"latest_commit_sha":null,"homepage":"https://dev.6aig.cn","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VenenoSix24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-21T14:34:12.000Z","updated_at":"2025-11-08T12:02:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"4db2bb9e-2089-40a8-9e77-98af159988a5","html_url":"https://github.com/VenenoSix24/igolib-ldu","commit_stats":null,"previous_names":["venenosix24/igolib-ldu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VenenoSix24/igolib-ldu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VenenoSix24%2Figolib-ldu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VenenoSix24%2Figolib-ldu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VenenoSix24%2Figolib-ldu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VenenoSix24%2Figolib-ldu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VenenoSix24","download_url":"https://codeload.github.com/VenenoSix24/igolib-ldu/tar.gz/refs/heads/manual-web","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VenenoSix24%2Figolib-ldu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28868876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T06:56:44.678Z","status":"ssl_error","status_checked_at":"2026-01-29T06:56:35.794Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","jinja2","library","python"],"created_at":"2026-01-29T07:01:23.113Z","updated_at":"2026-01-29T07:01:38.030Z","avatar_url":"https://github.com/VenenoSix24.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 我去抢个座 - Web版\n\n![版本](https://img.shields.io/badge/版本-3.2.1-blue.svg)\n![Python](https://img.shields.io/badge/Python-3.9+-green.svg)\n![FastAPI](https://img.shields.io/badge/FastAPI-0.115.12-brightgreen.svg)\n![TailwindCSS](https://img.shields.io/badge/TailwindCSS-2.2.19-38B2AC.svg)\n![许可证](https://img.shields.io/badge/许可证-MIT-yellow.svg)\n\n一个现代化的图书馆座位预约和抢座系统Web版，通过精美的响应式界面操作，轻松实现图书馆座位预约。系统支持明日预约和即时抢座两种模式，为用户提供便捷的图书馆座位管理体验。\n\n\n\n![igolib.png](https://s2.loli.net/2025/09/25/CDMzc4GfqbYWmBE.png)\n\n\n\n*基于某个我去图书馆，谁去图书馆？！！*\n\n**（人话：我想要抢一个喜欢的座位！！！！！！！拿来吧你）**\n\n## 👀 悄悄话\n\n**目前：**\n\n* 只支持卤蛋\n* 只支持特定场馆（因为我经常用）\n\n**未来：**\n\n* 增加选择他校配置\n* 自动获取场馆数据信息（现在的获取方法蠢蠢的）\n\n*咕咕咕...咕咕..*\n\n## 📆 我的待办集\n\n* [X] 重构拆分 beta.py 主程序，增强代码维护性\n* [ ] Cookie 获取教程\n* [ ] 输入 Cookie 后，检验 Cookie 可用性（好像有些多余）\n* [ ] 占座模式（感觉 Cookie 活不到 30 分钟）\n* [ ] 取消预约座位（那岂不是还要先检测是否已有预约）\n* [ ] 增加动态签到码显示选项\n* [ ] 多用户性能优化\n* [ ] 动态获取场馆、座位信息\n\n## ✨ 功能特性\n\n- 🔄 **明日预约模式**：在开放时间预约第二天的座位。\n- ⚡ **即时抢座模式**：实时抢占当天可用座位（虽然有些鸡肋）。\n- 🌐 **精美Web界面**：基于TailwindCSS的响应式设计。\n- 🌙 **深色/浅色模式**：自动适应系统主题或手动切换。\n- 🕒 **定时执行**：支持立即执行、预设时间或自定义时间三种执行方式。\n- 📊 **实时状态**：预约/抢座过程实时反馈，清晰的日志显示。\n- 📈 **全站统计**：实时查看本站的总抢座次数、今日次数和最受欢迎阅览室。\n- 📱 **移动友好**：完美支持手机访问和操作。\n- 🎨 **精美动效**：流畅的过渡动画和交互效果。\n\n## 📋 目录\n\n- [安装指南](#-安装指南)\n- [项目结构](#-项目结构)\n- [使用方法](#-使用方法)\n- [界面预览](#-界面预览)\n- [常见问题](#-常见问题)\n- [贡献指南](#-贡献指南)\n- [许可证](#-许可证)\n\n## 📦 安装指南\n\n### 环境要求\n\n- Python 3.9+\n- pip包管理器\n\n### 安装步骤\n\n1. **克隆或下载项目代码**\n\n   ```bash\n   git clone [https://github.com/VenenoSix24/igolib-ldu.git](https://github.com/VenenoSix24/igolib-ldu.git)\n   cd igolib-ldu\n   ```\n2. **创建并激活虚拟环境**（推荐）\n\n   ```bash\n   # macOS/Linux\n   python3 -m venv venv\n   source venv/bin/activate\n   \n   # Windows\n   python -m venv venv\n   venv\\Scripts\\activate\n   ```\n3. **安装依赖包**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## 🏗️ 项目结构\n\n经过重构，项目现在采用模块化结构：\n\n- `main.py`: 项目的统一启动入口。\n- `config.py`: 存放所有全局配置、URL和请求头。\n- `core.py`: 封装了最核心的抢座/预约业务逻辑。\n- `web_app.py`: 包含所有 FastAPI Web 服务、API路由和 WebSocket 逻辑。\n- `tasks.py`: 后台任务执行器，作为 Web 层和 Core 层的桥梁。\n- `cli.py`: 命令行版本的所有功能。\n- `data_utils.py`: 负责加载阅览室、座位等静态映射数据。\n- `achievements.py`: 负责处理全站统计数据的读写逻辑。\n- `globals.py`: 存放跨模块共享的全局变量。\n- `models.py`: 定义 Pydantic 数据模型。\n- `app_data/`: 存放程序运行时动态生成的数据。\n- `data_process/`: 存放预处理的静态数据。\n- `templates/` \u0026 `static/`: 前端文件。\n\n## 🚀 使用方法\n\n项目支持 Web 界面和命令行两种模式，通过 `main.py` 启动。\n\n### 启动Web服务\n\n在激活虚拟环境后，运行以下命令：\n\n```bash\npython main.py --web\n```\n\n如果希望局域网内的其他设备（如手机）也能访问，请使用：\n\n```bash\npython main.py --web --host 0.0.0.0\n```\n\n### 访问Web界面\n\n打开浏览器访问: `http://127.0.0.1:8000` 或 `http://[你的IP地址]:8000`\n\n### 启动命令行界面\n\n如果您想使用纯命令行版本，直接运行：\n\n```bash\npython main.py\n```\n\n### 使用流程\n\n1. **欢迎页面**：\n\n   - 阅读系统介绍和功能特点\n   - 查看系统使用情况统计\n   - 同意使用条款和隐私政策\n2. **配置页面**：\n\n   - 选择操作模式（明日预约/立即抢座）\n   - 填入Cookie信息（需自行抓包获取，教程还没写 T^T）\n   - 选择阅览室和填写座位号\n   - 设置执行时间（立即执行/默认时间/自定义时间）\n   - 提交请求\n3. **状态页面**：\n\n   - 实时查看预约/抢座进度\n   - 查看详细操作日志\n   - 获取最终结果\n\n## 🖼️ 界面预览\n\n太懒了，还没截图...\n\n## ❓ 常见问题\n\n### Q: 如何获取Cookie？\n\nA: 您需要使用抓包软件从图书馆小程序登录后获取Cookie信息（教程还没写...大家应该都会..吧..）。\n\n### Q: 预约失败怎么办？\n\nA: 常见原因包括Cookie失效、座位已被预约或网络问题。请检查Cookie是否有效，并尝试选择其他座位。\n\n### Q: 支持哪些浏览器？\n\nA: 支持所有浏览器，包括Chrome、Firefox、Edge、Safari等，并且对移动设备浏览器做了特别优化。\n\n## 🤝 贡献指南\n\n欢迎提交问题报告和功能请求！如果您想贡献代码：\n\n1. Fork这个仓库\n2. 创建您的特性分支 (`git checkout -b feature/amazing-feature`)\n3. 提交您的更改 (`git commit -m 'Add some amazing feature'`)\n4. 推送到分支 (`git push origin feature/amazing-feature`)\n5. 打开一个Pull Request\n\n## 📄 许可证\n\n该项目采用MIT许可证 - 详情请参阅LICENSE文件\n\n---\n\n**注意**：本项目仅供学习和研究使用，请遵守图书馆相关规定和校园网络使用规范。\n\n**注意**：本项目仅供学习和研究使用，请遵守图书馆相关规定和校园网络使用规范。\n\n**注意**：本项目仅供学习和研究使用，请遵守图书馆相关规定和校园网络使用规范。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenenosix24%2Figolib-ldu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenenosix24%2Figolib-ldu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenenosix24%2Figolib-ldu/lists"}