Giter Site home page Giter Site logo

mythsman / hexo-douban Goto Github PK

View Code? Open in Web Editor NEW
448.0 8.0 57.0 1.24 MB

:cd: a Hexo plugin that helps you generate content for Douban books, movies, music, and games.

License: MIT License

TypeScript 100.00%
hexo douban hexo-plugin hexo-douban douban-backup douban-crawler

hexo-douban's People

Contributors

alobal avatar auntyang avatar chenxs1427 avatar codertonychan avatar dependabot[bot] avatar forvoid avatar honwow avatar jerryc127 avatar liugezhou avatar merickbao avatar mythsman avatar sumorio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-douban's Issues

关于页面布局

Yikun的读书页面 的 封面和字体都要比你的大一些,看起来更加符合这个hexo主题,博主可以修改一下页面布局吗..

图片错位

在indigo主题下生成的页面图片会发生错位现象,而且一定几率Promise会报错。

页面无内容问题

1.0.7版本,执行hexo douban的时候能看到提示抓取到了数据,但是静态化和部署之后页面只有标题,没有其他任何内容,请问是什么情况。

生成文件时发生错误

在使用hexo douban生成文件时,出现错误。

以下是命令行输出的信息:
INFO Start processing
INFO 5 books have been loaded in 754 ms
INFO 45 movies have been loaded in 4327 ms
INFO 0 games have been loaded in 2127 ms
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\utils.js [ 45.85% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\animation.js [ 64.76% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\pack.js [ 51.37% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\loading.js [ 32.61% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\back-top.js [ 55.25% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\header.js [ 44.95% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\post.js [ 48.44% saved]
INFO hexo-filter-cleanup(USEREF): js/common.js
INFO hexo-filter-cleanup(HTML): 2018/06/05/hello-world/index.html [ 33.62% saved]
INFO hexo-filter-cleanup(HTML): books/index.html [ 31.97% saved]
INFO hexo-filter-cleanup(HTML): movies/index.html [ 23.17% saved]
INFO hexo-filter-cleanup(HTML): games/index.html [ 35.02% saved]
INFO hexo-filter-cleanup(HTML): archives/index.html [ 41.51% saved]
INFO hexo-filter-cleanup(HTML): archives/2018/index.html [ 41.49% saved]
INFO hexo-filter-cleanup(HTML): archives/2018/06/index.html [ 41.59% saved]
INFO hexo-filter-cleanup(HTML): index.html [ 40.59% saved]
Unhandled rejection TypeError: self.route.get(...)._data is not a function
at names.forEach.name (S:\i.t\blog\yooceii.github.io\node_modules\hexo-douban\index.js:83:48)
at Array.forEach ()
at S:\i.t\blog\yooceii.github.io\node_modules\hexo-douban\index.js:81:11
at tryCatcher (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)

1.0.8无法爬取书,电影和游戏正常

$ hexo douban
INFO Start processing
INFO 0 books have been loaded in 337 ms
INFO 305 movies have been loaded in 13031 ms
INFO 37 games have been loaded in 1837 ms
INFO Generated: books/index.html
INFO Generated: movies/index.html
INFO Generated: games/index.html

用的是hexo主题,不是显示问题,而是只有书爬不到。。。然后用了作者的user信息去爬,结果如上也是爬不到。。

关于读书模块

最近发现读书模块生成的页面中,书籍封面无法正常加载,建议作者关注下这个问题。

quote 样式显示问题

如下是我配置:

douban:
  user: 51517255
  builtin: true
  movie:
    title: '观影'
    quote: <div class="note success no-icon"><p>You got a dream, you gotta protect it. People can't do something themselves, they wanna tell you you can't do it.If you want something, go get it. --《当幸福来敲门》</p></div>

为了修改 quote 的默认效果,我用如上方式写的,但是显示的效果不符合预期:

image

我观察博主的显示效果是这样的,比较符合预期:

image

插件懒加载与hexo-lazyload-image冲突

之前用的1.0.4正常,今天更新博客发现无法爬取了,于是更新到1.0.6,发现新特性懒加载与插件hexo-lazyload-image 冲突 建议在插件中添加一个开关选项
如图
image

爬取速度有点慢怎么破

INFO Start processing
INFO 3683 movies have been loaded in 356577 ms
INFO Generated: movies/index.html
整整6分钟,我以为没反应了,第一次直接跳出了

豆瓣插件在发布时遇电影界面GET不到服务器

输入hexo g、hexo d、hexo、hexo s --debug时,均出现报错:
Error: connect ECONNREFUSED 127.0.0.1:80 (req "error"), GET http:///people/173149290/collect?start=15&sort=time&rating=all&filter=all&mode=grid -1 (connected: false, keepalive socket: false)
movies-generator.js里面将
var watchedUrl = 'https://movie.douban.com/people/' + config.douban.user + '/collect';注释,或者https换http,hexo可以发布,只是get不到豆瓣信息。

默认标签页和分页条数

请问可以增加两个功能吗,修改_config.yml便实现:
1.修改默认显示的标签页(如默认显示正在读的书,而非读过的书)。
2.另一个是修改自定义分页的条数(比如20条电影信息分页,而非10条)。

您做的非常好,非常感谢您!

url error (caused by root directory)

my blog is saving at subdirectory '/Blog'
So when I click movie link, the URL would be 'name.github.io/movie', but actually, the URL should be 'name.github.io/Blog/movie'. How to fix this error?
(When I change the config to moive: /Blog/movie, that would only work successfully once, at the next time will be /Blog/Blog/moive)

Buildin 嵌入的问题

您好,我Buildin设定为True了之后,生成页面任然未能嵌入hexo ghexo s,确定为最新版本。

分页处理

好像没有做分页处理,我看了一下你的代码好像是一次遍历所以的数据然后进行静态渲染的,

  do {
    res = callApi(config.douban.user, start);
    wish = wish.concat(res.wish);
    reading = reading.concat(res.reading);
    read = read.concat(res.read);
    start = res.start + res.count;
  } while ( start < res . total );

但是这样的话,如果数据请求过大,或者过多的化,感觉很容易出现下面这种情况

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: spawnSync C:\Program Files\nodejs\node.exe ETIMEDOUT
    at exports._errnoException (util.js:1018:11)
    at Object.spawnSync (child_process.js:459:20)
    at request (D:\blog\hexo\node_modules\urllib-sync\index.js:33:16)
    at callApi (D:\blog\hexo\node_modules\hexo-douban\lib\books-generator.js:25:13)
    at Hexo.module.exports (D:\blog\hexo\node_modules\hexo-douban\lib\books-generator.js:74:11)

就是说好像是因为等待返回数据同步的问题,这个在网络不好的环境下,generated成功的概率有点低。

目前我想到的方式

我感觉可以用js前端动态渲染的方式进行,就是去douban拿数据来渲染页面的方式,不知道可不可行

offline特性的问题

之前提过的一个 issue,在 hexo-douban 没有与 hexo s 解耦的时候,在网络不好的情况下,会导致 hexo s 执行起来卡在爬取的阶段,现在解耦命令了,感觉那个特性可以去除掉了,因为在网络不好的情况下,由于这个特性,会需要多次执行 hexo douban 才能正常生成页面。。

iOS版微信中,图片不展示

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。

貌似兼容性的问题,安卓里面OK。

up主,豆瓣只能显示默认内容,点击不会切换

你好,这款插件确实做得很好,但是用在项目中的时候我发现两个小问题,就是豆瓣书籍部分只能显示在读,要是我点击已读或者想读,电影部分也是这样子,只能显示默认的不能进行切换,请问后面还会再优化吗

关于aath主题不能正常显示

我这边试着用next和landscape主题使用该插件都是没问题的,但是换到aath主题就不能正常显示,想请教一下是什么原因,谢谢!

具体表现为使用aath主题时访问movies为空白页,且有如下警告:
screen shot 2018-02-05 at 2 01 51 pm

关于hexo s的问题

每次hexo s都会不停的对豆瓣接口进行请求,这就导致在断网或是网络环境不好的情况下运行hexo s会报错。

图书能抓到 电影和游戏抓不到?

INFO Start processing
INFO 105 books have been loaded in 2144 ms
INFO 0 movies have been loaded in 887 ms
INFO 0 games have been loaded in 920 ms
INFO ---- START COPYING TAG CLOUD FILES ----
INFO ---- END COPYING TAG CLOUD FILES ----
INFO Generated: books/index.html
INFO Generated: movies/index.html
INFO Generated: games/index.html

执行hexo g命令后报错

在安装插件以后,执行hexo g命令生成页面时报错,根据错误信息推断是Promise报错,请问在这种情况下我应该怎么做呢?

无法生成html页面

你好~~~我按照所有设置配了,但发布之后,进去一直提示404,cannot get books,请问是哪里出了问题呢?

开启 busuanzi 后,生成的豆瓣读书、电影不能加载 busuanzi

已经更新到 1.0.2 版本。

Hexo NexT主题(最新版本 Hexo 和最新版本 NexT)开启 busuanzi 后,生成的豆瓣读书、电影等页面不能加载 busuanzi,Chrome 提示:

Failed to load resource: the server responded with a status of 400 (Bad Request)
http://busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback_213324422534

而且导致生成的豆瓣读书、电影等页面的页脚中由 busuanz 统计的总访客数、总访问量无法显示。

bug?

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。

设置了builtin参数为true,
hexo g 后,虽然会显示 XX movies have been loaded in xx ms
但是不会生成 movies/index.html
试了好多次都一样,打开Movies 显示不存在。最终还是靠hexo douban来解决

还有头部
image
能否自己修改名称?

douban-loading.gif的问题

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
建议去掉 douban-loading.gif 要么放进npm 要么就去掉 不然界面会报错

加引用来源和书的读后感链接

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。

加引用来源

我觉得既然可以加 quote,那就应该可以选择添加 quote 的 cite 引用来源。
例如:

仓促本身就是最要不得的态度。当你做某件事的时候,一旦想要求快,就表示你再也不关心它,而想去做别的事。
罗伯特 · M · 波西格 《禅与摩托车维修艺术》

myblog\node_modules\hexo-douban\lib\templates\book.ejs

<blockquote>
    <p><%- quote; %></p>
    <cite><%- quoteAuthor; %></cite>
</blockquote>

能加多个引用来源的支持就更好了

读后感链接

因为插件目前好像只抓豆瓣的短评,而自己有时候会为书写读后感(书评),因此在书的页面下能否为一些书添加读后感(书评)的链接。
我觉得简单点的做法就是:在豆瓣某本书上评论里放读后感的链接,然后插件生成页面的时候能正则判断下,给链接加个 标签。
或者可以配置文件中加配置这种方式:

bookid: 1234567
link: 'http://example.com' 

Bug

buildIn 没效果,hexo g 会检查配置是否合法,但是不会重新生成新的 HTML 文件。

不知道作者对这样的新功能请求有什么看法😂

似乎不支持archer这个主题,hexo douban后报错

使用该主题,打算把豆瓣的页面放到侧边栏,hexo douban的时候,显示
Unhandled rejection TypeError: Cannot read property 'format' of undefined,节选报错如下图

image

报错太长,我也看不懂,希望开发者能尝试解决一下,谢谢

404错误

您好 我想请问一下 博客中添加的hexo-douban这个插件,在本地调试是没问题的 hexo clean hexo g hexo d 之后就404了

我的插件装好之后,hexo douban b 生成的books是在站点目录下的public中 (每次hexo clean之后这个目录好像都会被删掉) 请问你们是如何处理这个问题的????

移动端豆瓣读书图片显示问题

在网页端显示没有问题,包括用chrome的视图适配到移动端尺寸也ok,比如下图

image

但是如果直接从手机上打开网址会发现图片显示不出来,点击会有fancybox的报错信息,比如下两图:

img_1179
img_1180

也比较好奇这种情况我应该怎么测试,会不会和fancybox相关,我尝试disable掉这个插件在_config.xmlfancybox:false,这个时候整个豆瓣读书都section都不会显示,但travis ci里没有报错。

博客主题 next-mist,
node版本 7,
博客连接 www.chocoluffy.com/books/

谢谢分享,很棒的插件!

Mac和手机下单referrerpolicy不生效

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。

Mac和手机下单referrerpolicy不生效
Chrome正常

Connect ECONNREFUSED 127.0.0.1:80

最近发现该插件在生成页面的时候会出现以下错误,昨天TravisCI同样执行失败了:
_20180322092047
可以告诉我具体是因为什么原因吗?如果是我nodejs环境有问题,比如这个端口被占用,可持续集成服务的环境应该不会出现这种问题啊,我检查你代码里请求的URL,没有错误啊,为什么这里baseURL没有了呢?费解啊

运行 hexo douban 时报错

如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。

node v6.6.0
hexo-douban v1.1.0
hexo v3.7.1 v3.8.0

image

查看是这里报错,if(cookie.length==0){ 我把 cookie 的声明放在函数内就不报错了。但无法抓取到任何书或者电影。

应该是最近的更新导致的,之前在 v1.0.5 是 ok 的。

No layout?

I install this plugin in your method.
But when I visit http://localhost:4000/books,I find that my terminal show me a warning which said "WARN No layout: books/index.html"
How can I solve this problem?
Maybe I should develop this page by myself?

一个小建议 关于插件开关

感谢owner主如此棒的插件~
有个小建议 不知道好不好实现
0.2.13已对网络环境不好的情况下进行了优化 能不能在hexo -s的时候加入一个参数使其不加载douban插件,这样就不会每次修改一些配置或者post的时候都重新获取一次豆瓣数据了(每次获取的时候都会卡一段时间 这段时间localhost:4000是不能访问的)。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.