{"id":30686021,"url":"https://github.com/tanknee/hexo-douban-card","last_synced_at":"2025-09-01T22:13:36.050Z","repository":{"id":49620925,"uuid":"278017093","full_name":"TankNee/hexo-douban-card","owner":"TankNee","description":"在hexo文章中插入豆瓣读书,豆瓣电影,豆瓣音乐组件","archived":false,"fork":false,"pushed_at":"2023-01-24T03:17:23.000Z","size":91,"stargazers_count":76,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T07:49:11.725Z","etag":null,"topics":["cookie","hexo","hexo-douban","hexo-douban-card","hexo-plugin"],"latest_commit_sha":null,"homepage":"https://docs.tanknee.cn/projects/hexo-bo-ke-xi-tong-dou-ban-zu-jian#shi-yong-fang-fa","language":"JavaScript","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/TankNee.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}},"created_at":"2020-07-08T07:11:18.000Z","updated_at":"2025-03-08T10:55:53.000Z","dependencies_parsed_at":"2023-01-24T12:16:01.155Z","dependency_job_id":null,"html_url":"https://github.com/TankNee/hexo-douban-card","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TankNee/hexo-douban-card","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankNee%2Fhexo-douban-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankNee%2Fhexo-douban-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankNee%2Fhexo-douban-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankNee%2Fhexo-douban-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TankNee","download_url":"https://codeload.github.com/TankNee/hexo-douban-card/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankNee%2Fhexo-douban-card/sbom","scorecard":{"id":137934,"data":{"date":"2025-08-11","repo":{"name":"github.com/TankNee/hexo-douban-card","commit":"aed70728333165a079a231199e67477ffbe94e44"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: Something went wrong while executing your query on 2025-08-12T14:16:44Z. Please include `E30C:ECB19:58FCB7:13F8D36:689B4CCB` when reporting this issue.","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-3949-f494-cm99","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T07:08:17.915Z","repository_id":49620925,"created_at":"2025-08-16T07:08:17.915Z","updated_at":"2025-08-16T07:08:17.915Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273198244,"owners_count":25062449,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cookie","hexo","hexo-douban","hexo-douban-card","hexo-plugin"],"created_at":"2025-09-01T22:13:23.233Z","updated_at":"2025-09-01T22:13:36.043Z","avatar_url":"https://github.com/TankNee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## HEXO-DOUBAN-CARD\n\n一个 HEXO 插件,实现了用 HEXO 语法来在博客中插入一个豆瓣读书卡片的功能,现在实现了读书和电影两个板块\n\n[![NPM version](https://badge.fury.io/js/hexo-douban-card.svg)](https://www.npmjs.com/package/hexo-douban-card)\n[![npm](https://img.shields.io/npm/dt/hexo-douban-card.svg)](https://www.npmjs.com/package/hexo-douban-card)\n[![GitHub license](https://img.shields.io/github/license/TankNee/hexo-douban-card.svg)](https://github.com/TankNee/hexo-douban-card/blob/master/LICENSE)\n[![NPM](https://nodei.co/npm/hexo-douban-card.png)](https://nodei.co/npm/hexo-douban-card/)\n\n### 用法\n\n首先请安装插件\n\n```bash\n$ npm install hexo-douban-card --save\n```\n\n然后使用以下语法\n\n```markdown\n{% douban movie 24745500 %}\n\n{% douban book 30376420 %}\n\n{% douban music 35099703 %}\n```\n\n### 参数阐述\n\n- 第一项`douban` 代表插件名\n\n- 第二项可选:`movie`,`book`,`music`\n\n- 第三项请填入对应的`id`例如:\n\n![](https://img.tanknee.cn/blogpicbed/2020/07/2020070821522816eaefa.png)\n\n填写subject后面的那串数字就好\n\n### 示意图\n\n![](https://img.tanknee.cn/blogpicbed/2020/07/20200708f878ac4cfa250.png)\n\n### 作品站点\n\nhttps://www.tanknee.cn/2020/07/08/Hexo%E8%B1%86%E7%93%A3%E6%96%87%E7%AB%A0%E6%8F%92%E4%BB%B6/\n\n### 插件配置\n\n需要在 `_config.yml` 中配置 `doubanCard`，但这并不是必选项，如果你遇到了某些需要登录的豆瓣网址，那么请填写 cookie，如果你遇到图片代理失效的问题，请自行替换 imgProxy。未经验证的代理网址可以参考这个 issue：[图像加速服务weserv地址被reset了，不能显示图片](https://github.com/TankNee/hexo-douban-card/issues/22)\n\n\n```yml\n\ndoubanCard:\n  enable: true\n  cookie: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n  imgProxy: https://images.weserv.nl/?url=\n\n```\n\n## 2022/08/30 更新\n\n~~添加了全局开关，现在可以直接在配置中开启或者关闭 douban-card，如果你想要关闭，请将 enable 设置为 false~~ 现已取消这个总开关。另外，本版本中卡片的样式改为一次性插入到页面head中，不再重复插入。\n\n## 2022/08/28 更新\n\n添加了一个背景懒加载属性，请配合[https://github.com/Troy-Yang/hexo-lazyload-image](https://github.com/Troy-Yang/hexo-lazyload-image)使用。\n\n## 2022/08/21 更新\n\n修复了构造器的问题，并将自定义图片代理的功能放入用户配置中，现在，你可以使用如下配置：\n\n```yml\n\ndoubanCard:\n  cookie: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n  imgProxy: https://images.weserv.nl/?url=\n\n```\n\n## 2022/08/20 更新\n\n修复了缓存失效的问题，上一个版本由于对象键大小写的问题导致缓存无法正常工作，所以还是会有不断访问豆瓣网站的问题，该版本修复了这个问题。\n\n同时，本版本添加了部分日志，方便出错之后的调试工作。\n\n## 2022/08/06 更新\n\n添加了一个内容缓存文件，每次生成卡片的时候会优先从缓存文件中查找，若是找到了则直接使用，若没有则重新生成，这样做减少了对豆瓣网页的访问，降低了被当做机器人的概率。\n\n缓存文件名字为 `DoubanCard.json`，若爬取到的数据有误，可以直接把这个文件删了，或者手动修改这个文件。\n\n## 2022/02/13 更新\n\n使用自己编写的渲染器替换 nunjucks 渲染器，理论上是不会出现 #3 那个报错了，如果还出错请清空缓存，重新安装 hexo-douban-card 试试，还不行的话我也无能为力了。\n\n新增电影、书籍的阅读状态爬取，前提是你配置了 cookie，详情请参照 2020/09/17 更新的更新内容。\n\n![](https://img.tanknee.cn/blogpicbed/2022/02/13/2022021364172833e27c9.png)\n\n## 2020/09/17 更新\n\n**修复1.2.1中不使用cookie时出现报错无法编译的问题，该问题较为严重，希望1.2.1及以下版本的用户尽快更新！！！！**\n\n## 2020/09/01 更新\n\n当前版本(1.2.0)中修复了部分电影，音乐无法正常爬取的问题，例如电影《天浴》，id：1302836。\n无法爬取的原因在于电影需要登陆才可以正常爬取内容，因此当前版本添加了新的配置。如果你遇到了上述问题，请到hexo根目录下的`_config.yml`文件中，添加一项：\n\n```yaml\ndoubanCard:\n    cookie: xxxxx\n```\n然后将xxxx替换成你的cookie，cookie的获取办法是：\n\n1. 打开豆瓣网页，登陆账号\n\n2. 随便点击一个页面，然后打开控制台\n\n![](https://img.tanknee.cn/img/20200901185319.png)\n\n3. 将Cookie那一项的所有内容复制出来，放在配置文件中即可\n\n## 2020/07/13 更新\n\n某些特定的电影需要登陆才可以查看到对应的信息,1.1.8-c版本不做修改时会报生成错误,暂时只做冷处理,即显示一个提示图片,在下一个版本`1.2.0`中会做更优化的处理!\n\n![](https://img.tanknee.cn/blogpicbed/2020/07/20200713875399cbbb527.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanknee%2Fhexo-douban-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanknee%2Fhexo-douban-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanknee%2Fhexo-douban-card/lists"}