RSSHub icon indicating copy to clipboard operation
RSSHub copied to clipboard

微博图片403 Forbidden

Open KawausoJyou opened this issue 1 year ago • 33 comments

路由地址

/weibo/user/:uid/:routeParams?

完整路由地址

/weibo/user/6048193311/readable=1&showEmojiForRetweet=1&addLinkForPics=1&showTimestampInDescription=1&displayVideo=0&showEmojiInDescription=0&showLinkIconInDescription=0

相关文档

https://docs.rsshub.app/social-media.html#wei-bo-bo-zhu

预期是什么?

正常显示图片

实际发生了什么?

图片无法正常显示,且图片链接显示403 Forbidden Snipaste_2022-10-15_10-22-29 Snipaste_2022-10-15_10-22-38

部署

自建

部署相关信息

OS: Linux, Node: v12.22.12, Docker: v20.10.18

额外信息

<item>
<title>
<![CDATA[ 本周的宝可梦四格漫画来啰!这次的主角是卡蒂狗!卡蒂狗是不是很可爱呢!你觉得它努力忍耐了多久才输给了食欲?#宝可梦# [图片] ]]>
</title>
<description>
<![CDATA[ 本周的宝可梦四格漫画来啰!<br>这次的主角是卡蒂狗!<br><br>卡蒂狗是不是很可爱呢!<br>你觉得它努力忍耐了多久才输给了食欲?<br><a href="https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E5%AE%9D%E5%8F%AF%E6%A2%A6%23&amp;isnewpage=1" data-hide=""><span class="surl-text">#宝可梦#</span></a> <br clear="both"><div style="clear: both"></div><a href="https://wx3.sinaimg.cn/large/006BjBn1ly1h75p83ei0sj30u02jgn5g.jpg"><img vspace="8" hspace="4" style="" src="https://wx3.sinaimg.cn/large/006BjBn1ly1h75p83ei0sj30u02jgn5g.jpg" referrerpolicy="no-referrer"></a> ]]>
</description>
<pubDate>Sat, 15 Oct 2022 01:07:34 GMT</pubDate>
<guid isPermaLink="false">https://weibo.com/6048193311/Mao8CfRUO</guid>
<link>https://weibo.com/6048193311/Mao8CfRUO</link>
<author>
<![CDATA[ 知任CHS ]]>
</author>
</item>

这不是重复的 issue

  • [X] 我已经搜索了现有 issue,以确保该错误尚未被报告。

KawausoJyou avatar Oct 15 '22 02:10 KawausoJyou

Searching for maintainers:
  • /weibo/user/:uid/:routeParams?: No maintainer listed, possibly a v1 or misconfigured route

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

如果有任何路由无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。 If there is any route not found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.

github-actions[bot] avatar Oct 15 '22 02:10 github-actions[bot]

Inoreader?

TonyRL avatar Oct 15 '22 11:10 TonyRL

Inoreader?

FreshRSS

KawausoJyou avatar Oct 15 '22 11:10 KawausoJyou

Screenshot

image

It works fine on a new installation of FreshRSS

TonyRL avatar Oct 15 '22 11:10 TonyRL

Screenshot image

It works fine on a new installation of FreshRSS

What is your version of FreshRSS and RSS Hub? My FreshRSS version is 1.20.0, and my RSSHub version is https://github.com/DIYgod/RSSHub/commit/ed08cefe307ee4863e18c695abf347cad4b5c56c. Did Weibo add my IP to the blacklist?

KawausoJyou avatar Oct 15 '22 12:10 KawausoJyou

For self-hosted instances, refer to #10874 for more available workarounds.

Rongronggg9 avatar Oct 15 '22 12:10 Rongronggg9

Screenshot

It works fine on a new installation of FreshRSS

What is your version of FreshRSS and RSS Hub? My FreshRSS version is 1.20.0, and my RSSHub version is ed08cef. Did Weibo add my IP to the blacklist?

FreshRSS 1.20.0. To be specific, it's https://hub.docker.com/r/linuxserver/freshrss RSS feed is fetched from the demo instance

TonyRL avatar Oct 15 '22 12:10 TonyRL

For self-hosted instances, refer to #10874 for more available workarounds.

Sorry, I can't fully understand how to use "image_hotlink_template". Could you please explain it in detail?

KawausoJyou avatar Oct 15 '22 12:10 KawausoJyou

For self-hosted instances, refer to #10874 for more available workarounds.

Sorry, I can't fully understand how to use "image_hotlink_template". Could you please explain it in detail?

Have you read the beginning of https://docs.rsshub.app/en/parameter.html?

Rongronggg9 avatar Oct 15 '22 12:10 Rongronggg9

For self-hosted instances, refer to #10874 for more available workarounds.

Sorry, I can't fully understand how to use "image_hotlink_template". Could you please explain it in detail?

Have you read the beginning of https://docs.rsshub.app/en/parameter.html?

I have already read the link you sent. I found that when the referer is empty, the picture cannot be displayed. When the referer is "weibo. com", the picture can be displayed normally. However, I don't know how to write "image_hotlink_template" to add a referer. Snipaste_2022-10-15_21-29-00 Snipaste_2022-10-15_21-28-53

KawausoJyou avatar Oct 15 '22 13:10 KawausoJyou

Ohh, I see. sinaimg.cn has been upgraded, it bans requests from browsers without referer set to https://weibo.com. However, the limit is only applied when the request is from Mainland China. In other regions, zero referer is permitted, that's why @TonyRL can load the pic.

Rongronggg9 avatar Oct 15 '22 13:10 Rongronggg9

If you deploy https://github.com/Rongronggg9/rsstt-img-relay on Cloudflare, a referer is unnecessary as Cloudflare has no edges in Mainland China.

Rongronggg9 avatar Oct 15 '22 13:10 Rongronggg9

If you deploy https://github.com/Rongronggg9/rsstt-img-relay on Cloudflare, a referer is unnecessary as Cloudflare has no edges in Mainland China.

Thank you very much for your patience. I have successfully deployed rsst-img-relay on Cloudflare and configured the "HOTLINK_TEMPLATE" variable. Now the image can be displayed normally.

KawausoJyou avatar Oct 15 '22 15:10 KawausoJyou

I'm observing the same issue, and my IP is not within mainland China. Has weibo gone stricter on this?

lingnand avatar Nov 22 '22 10:11 lingnand

https://zmingcx.com/sina-micro-album-address.html 参考这篇文章,应该是新浪为了防止图片外链被盗用,更改了外链地址吧!

leoneoo avatar Nov 23 '22 13:11 leoneoo

https://zmingcx.com/sina-micro-album-address.html 参考这篇文章,应该是新浪为了防止图片外链被盗用,更改了外链地址吧!

感谢回复,请问如何将文章中的修改应用到RSSHub呢🥲

KawausoJyou avatar Nov 23 '22 15:11 KawausoJyou

https://zmingcx.com/sina-micro-album-address.html 参考这篇文章,应该是新浪为了防止图片外链被盗用,更改了外链地址吧!

能用 👍🏻 @Rongronggg9 能否把这个整合到 weibo 的 router 里?

或者如果 HOTLINK_TEMPLATE 可以支持 regex 替换的话,那对于这类情况还挺有用的——只需要 replace 一下 subdomain 就好了。

lingnand avatar Nov 23 '22 15:11 lingnand

If you deploy https://github.com/Rongronggg9/rsstt-img-relay on Cloudflare, a referer is unnecessary as Cloudflare has no edges in Mainland China.

Just tested it, not worked any more. :(

zydou avatar Nov 24 '22 17:11 zydou

又挂了

有些能显示,有些裂图

KwToPA avatar Nov 27 '22 10:11 KwToPA

If you deploy https://github.com/Rongronggg9/rsstt-img-relay on Cloudflare, a referer is unnecessary as Cloudflare has no edges in Mainland China.

这个方法也失效了

xmt328 avatar Jan 04 '23 02:01 xmt328

If you deploy https://github.com/Rongronggg9/rsstt-img-relay on Cloudflare, a referer is unnecessary as Cloudflare has no edges in Mainland China.

这个方法也失效了

https://github.com/DIYgod/RSSHub/issues/10874#issuecomment-1369647937

Rongronggg9 avatar Jan 04 '23 11:01 Rongronggg9

What are the new ways to solve this problem?

i-iooi-i avatar Feb 04 '23 11:02 i-iooi-i

我不太懂反盗链/反反盗链,请问如果我用 chrome 网页访问 inoreader,用 no-referrer 的 userscript 有用吗?例子:

https://greasyfork.org/en/scripts/376884-%E6%98%BE%E7%A4%BA%E9%98%B2%E7%9B%97%E9%93%BE%E5%9B%BE%E7%89%87-for-inoreader/code

zizhengwu avatar Feb 06 '23 01:02 zizhengwu

现在全部图片都裂了 右键Access Denied Reference # 一串数字

KwToPA avatar Feb 10 '23 06:02 KwToPA

是不是可能应该 reopen 一下这个 issue,因为问题似乎依然存在,而这个 issue 是 Closed 的状态。微博可能是用的人比较多的路由,所以解决这个问题会帮助很多人。

zizhengwu avatar Mar 07 '23 21:03 zizhengwu

是不是可能应该 reopen 一下这个 issue,因为问题似乎依然存在,而这个 issue 是 Closed 的状态。微博可能是用的人比较多的路由,所以解决这个问题会帮助很多人。

的确,是否能支持一下解决这个问题。

ttxhxz avatar Mar 13 '23 11:03 ttxhxz

我测试使用rsshub默认参数启动 netnewswire的mac客户端可以打开微博图片。但是ios端不行。不知道原因在哪。

fightroad avatar Apr 07 '23 02:04 fightroad

现在怎么解决吗微博图片问题

linzzzzllll avatar Apr 26 '23 03:04 linzzzzllll

目前我用了一个 workaround,适用于电脑 chrome 浏览器浏览 inoreader。可以用插件,给图片加 referer。详情见下面帖子的 4 楼

https://www.v2ex.com/t/904989#;

移动端或者其他客户端有没有解决方式我也想知道。

zizhengwu avatar Jul 04 '23 02:07 zizhengwu

依然无法工作,有时候右键新图标打开都不行,图片抬头wx1改成wx2就报错403

只能用这个插件,large改成original再调转一次可以看原图

https://greasyfork.org/en/scripts/2312-resize-image-on-open-image-in-new-tab

KwToPA avatar Jul 22 '23 08:07 KwToPA