Redirect Magnet Links to Webtor.io

Redirect all magnet links to webtor.io.

< 腳本Redirect Magnet Links to Webtor.io的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2024-05-04

Perfect!
I was just about to make it myself, but then I saw it already existed.

I am glad this work, at least this way I don't have to install their old and outdated extension https://chromewebstore.google.com/detail/webtorio-watch-torrents-o/ngkpdaefpmokglfnmienfiaioffjodam

§
發表於:2024-10-08
編輯:2024-10-08

working code

// ==UserScript==
// @name Redirect Magnet Links to Webtor.io
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Redirect all magnet links to webtor.io.
// @author canary_in_a_coleslaw-ChatGPT
// @match *://*/*
// @grant none
// @downloadURL https://update.gf.qytechs.cn/scripts/481975/Redirect%20Magnet%20Links%20to%20Webtorio.user.js
// @updateURL https://update.gf.qytechs.cn/scripts/481975/Redirect%20Magnet%20Links%20to%20Webtorio.meta.js
// ==/UserScript==

(function() {
'use strict';
document.addEventListener('click', function(e) {
var clickedEl = e.target.closest('a');
if (!clickedEl || !clickedEl.href.startsWith('magnet:')) return;
e.preventDefault();
location.href = 'https://webtor.io/' + clickedEl.href.match(/[A-F0-9]{40}/gmi)[0].toLowerCase();
}, true);
})();

Rust1667作者
§
發表於:2024-10-09

thank you! I just updated with your code

§
發表於:2024-10-15

Look at the JavaScript fetch example here https://rapidapi.com/paveltatarsky-Dx4aX7s_XBt/api/webtor/playground/apiendpoint_f092fd42-e8c5-437f-ac9e-049869ce46d7

You need to add an API Key.
Right now it fails if the torrent has never been magnetized before by them, and this happens kind of often...

發表回覆

登入以回復

QingJ © 2025

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