您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Scrapes and displays data from the web page based on rules.
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/471264/1222840/MagicScraper.js
const rules = {
// Your rules object here
};
const options = {
keepChildren: false, // Set to true if you want to retain children of scraped elements
};
magicScraper(rules, [options]);
// OR
magicScraper('https://example.com/rules.json', [options]);
const rules = {
// Global rules for the entire example.com domain
'example.com': {
title: 'h1',
content: '.main-content',
pages: {
// Specific rules for the homepage of example.com
'/': {
subtitle: '.subtitle',
featuredImage: '.featured-image',
},
// Fallback rules for any other page under example.com
'*': {
defaultTitle: 'h2',
},
},
// Specific rules for any page under the blog subdomain
'blog.example.com/*': {
blogTitle: '.blog-title',
blogContent: '.blog-content',
},
// Wildcard rules for any subdomain under example.com
'*.example.com': {
subdomainTitle: '.subdomain-title',
},
// Wildcard rules for any page under the about subdomain
'about.example.com/*': {
aboutSection: '.about-section',
}
},
// Global rules for the entire test.com domain
'test.com': {
title: 'h1',
testContent: '.test-content',
},
// Fallback rules for any other domain not specified above
'*': {
defaultTitle: 'h1',
defaultContent: '.main-content',
},
};
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址