{"id":19085097,"url":"https://github.com/lgiki/douban-image-grid","last_synced_at":"2025-04-14T01:15:16.353Z","repository":{"id":115900648,"uuid":"585186980","full_name":"LGiki/douban-image-grid","owner":"LGiki","description":"生成豆瓣年度已读书籍封面墙 / 已看电影海报墙 / 已听音乐封面墙","archived":false,"fork":false,"pushed_at":"2023-01-05T06:33:21.000Z","size":219,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T15:21:18.138Z","etag":null,"topics":["douban","spider","wrapped"],"latest_commit_sha":null,"homepage":"","language":"Python","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/LGiki.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}},"created_at":"2023-01-04T14:38:36.000Z","updated_at":"2025-01-03T10:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9a4f0f1-56b3-4744-8f40-ab25b7cc6e56","html_url":"https://github.com/LGiki/douban-image-grid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGiki%2Fdouban-image-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGiki%2Fdouban-image-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGiki%2Fdouban-image-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGiki%2Fdouban-image-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LGiki","download_url":"https://codeload.github.com/LGiki/douban-image-grid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804824,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["douban","spider","wrapped"],"created_at":"2024-11-09T02:54:30.969Z","updated_at":"2025-04-14T01:15:16.326Z","avatar_url":"https://github.com/LGiki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Douban Image Grid\n\n![GitHub](https://img.shields.io/github/license/LGiki/douban-image-grid?style=flat-square)\n\n根据豆瓣标记了\"读过\"的书籍、\"看过\"的电影、\"听过\"的音乐，生成书籍封面墙、电影海报墙、音乐封面墙。\n\n# 效果图\n\n![](example.webp)\n\n# 使用方法\n\n```bash\ngit clone https://github.com/LGiki/douban-image-grid.git\ncd douban-image-grid\npip install -r requirements.txt\npython douban_image_grid.py --id=YOUR_DOUBAN_ID_HERE\n```\n\n执行完毕后可以到 `output` 目录中找到输出的封面墙图片，默认生成的是今年所看过的书籍的封面墙。\n\n# 参数\n\n执行 `python douban_image_grid.py --help` 可以查看全部支持的参数。\n\n豆瓣 ID 可以在 PC 端登陆豆瓣账号，然后点击右上角的 \"XXX的账号\" 下拉选择 \"个人主页\"，之后将跳转到类似 `https://www.douban.com/people/xxxxxxxxx/` 的链接，链接中的 `xxxxxxxxx` 即为豆瓣 ID。\n\n| 参数            | 默认值                                                       | 说明                                                         |\n| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| --id            |                                                              | 你的豆瓣ID，**必填**                                         |\n| --mode          | `book`                                                       | 要生成的图片类型，该参数可以是：`book`、`movie`或`music`，分别表示图书封面墙、电影海报墙和音乐封面墙 |\n| --year          | 当前年份                                                     | 要生成的年份，例如要生成 2022 年看/听过的书/电影/音乐，只需将该项设置为 `2022` 即可\u003cbr /\u003e如果将该项设置为`all`，则会读取账号所有的已读/已看/已听 |\n| --width         | 600                                                          | 小图的宽度，单位：px                                         |\n| --height        | 800                                                          | 小图的高度，单位：px\u003cbr /\u003e当 `mode` 参数设置为 `music` 时，将忽略该参数，并将其设置为和 `width` 相等 |\n| --column        | 7                                                            | 大图的列数                                                   |\n| --user_agent    | `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36` | 发送请求时使用的 [User Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) |\n| --cache_folder  | `cache`                                                      | 缓存图片的目录路径                                           |\n| --cookie        |                                                              | 当程序出错时，可以指定该参数为豆瓣的 Cookie                  |\n| --output_folder | `output`                                                     | 输出图片的目录路径                                           |\n\n# 致谢\n\n- [https://github.com/icue/DoubanImageWall](https://github.com/icue/DoubanImageWall)\n\n# License\n\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgiki%2Fdouban-image-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgiki%2Fdouban-image-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgiki%2Fdouban-image-grid/lists"}