Giter Club home page Giter Club logo

Comments (4)

LetTTGACO avatar LetTTGACO commented on June 16, 2024

方便出问题的语雀文章链接发过来我试一下吗?

from yuque-hexo.

KaimingWan avatar KaimingWan commented on June 16, 2024

下面是部分info日志,我试过wget和直接下载,图片大小都正常。怀疑是代码里面download yuque image部分的代码有问题

[INFO] replace https://cdn.nlark.com/yuque/0/2022/png/96442/1662608168342-d8baa156-89ab-4668-8ea0-c3afb15d3af0.png to http://hexo-blog-img.oss-cn-hangzhou.aliyuncs.com/blog-images/FhreQmN4N7USIzJxYphuKkpryaj5.png
[INFO] replace https://cdn.nlark.com/yuque/0/2022/png/96442/1662608415380-28ac9b0c-1407-478c-8ebe-1cd7a2482ba1.png to http://hexo-blog-img.oss-cn-hangzhou.aliyuncs.com/blog-images/FvglynIzMBFY_2bQD0YPS3yyhemi.png
[INFO] replace https://cdn.nlark.com/yuque/0/2022/png/96442/1662608532083-7681f6eb-146e-453e-830e-448d6f2e30b1.png to http://hexo-blog-img.oss-cn-hangzhou.aliyuncs.com/blog-images/FpqDDfP5kE6jlxh5hW3iJbPikmGi.png
[INFO] replace https://cdn.nlark.com/yuque/0/2022/png/96442/1662608695403-ca4a381e-c1fe-4fe5-9f9c-9f8b271ce7b7.png to http://hexo-blog-img.oss-cn-hangzhou.aliyuncs.com/blog-images/FhY8omhq11CWO48mx3CNepvZGf2-.png
[INFO] replace https://cdn.nlark.com/yuque/0/2022/png/96442/1662608757912-92ec5703-c4ea-4d2c-8aa7-29f58664e641.png to http://hexo-blog-img.oss-cn-hangzhou.aliyuncs.com/blog-images/Futug5035MAjiBut2qzgD130PKE7.png

from yuque-hexo.

KaimingWan avatar KaimingWan commented on June 16, 2024

应该是下载图片处理有问题了。我自己重新写了个工具已经解决了。感谢楼主项目提供的思路。

from yuque-hexo.

furacas avatar furacas commented on June 16, 2024

我遇到了同样的问题,我这边排查之后发现是因为最近语雀图片cdn的反爬策略加强了吧,以前项目里面的superagent请求没设置User-Agent的时候会直接被403掉。
我看现在的master分支上已经设置上了,可以更新一下版本试试看

await superagent
.get(yuqueImgUrl)
.set('User-Agent', 'Mozilla/5.0')
.buffer(true)
.parse(res => {
const buffer = [];
res.on('data', chunk => {
buffer.push(chunk);
});
res.on('end', () => {
const data = Buffer.concat(buffer);
resolve(data);
});
});

from yuque-hexo.

Related Issues (20)

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.