Greasy Fork is available in English.

下载微博图片和视频

一键下载一条微博中的图片,文件名包含该微博的路径.xxx_wb_uid_wid,可恢复为 https://weibo.com/uid/wid

< Părere la script-ul 下载微博图片和视频

Întrebare/comentariu

§
Postat în: 24-10-2018

经常有图片下载不了的情况出现,控制台出现错误提示

比如这个微博: https://weibo.com/1954969202/EFlPhnA8U?filter=hot&root_comment_id=0&type=comment#_rnd1540354944325

控制台错误: Failed to load https://wx1.sinaimg.cn/large/74867672gy1fesxh2u0rej22kw3vcu11.jpg: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://weibo.com' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

§
Postat în: 24-10-2018

最主要的是有时候下没下完都不知道,希望能改进一下

FlaoAutor
§
Postat în: 24-10-2018

感谢关注!更新了一下,添加了下载情况的提示。但是下载出错的问题还没搞懂。本来跨域问题就要后端处理,这里看起来随机的出现。你这个网址我试来是能下的。另外我在代码的 getWeiboPath 函数里加了获取日期的代码, //let date 语句。得到的是如 2018-10-24 19:43格式的时间,处理以一下加入path就行了

Postează un raspuns

Autentifică-te pentru a posta un răspuns.