pixiv 解決圖片403禁止訪問

pixiv默認禁止直接訪問圖片,會顯示403 Forbidden,安裝腳本解決。

当前为 2022-03-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         pixiv 解決圖片403禁止訪問
// @namespace    https://gf.qytechs.cn/scripts/439130
// @version      1.5
// @description  pixiv默認禁止直接訪問圖片,會顯示403 Forbidden,安裝腳本解決。
// @author       fmnijk
// @match        https://i.pximg.net/*
// @match        https://img-comic.pximg.net/*
// @match        http://i.pximg.net/*
// @match        http://img-comic.pximg.net/*
// @icon         https://www.google.com/s2/favicons?domain=pixiv.net
// @license      MIT
// ==/UserScript==

(function() {
	'use strict'
    if (location.protocol !== 'https:') {
        location.replace(`https:${location.href.substring(location.protocol.length)}`);
    }
	if (document.title === '403 Forbidden') {
        /*const url = window.location.href;
        const fname = location.pathname.split('/').slice(-1)[0];
		const nurl = `https://www.pixiv.net/member_illust.php?mode=medium&illust_id=${
			/(\d+)/.exec(fname)[1]
		}`;
        window.location.replace(nurl);
        window.location.replace(url);*/
        window.location.reload(); //https://stackoverflow.com/questions/9580575
	}
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址