Greasy Fork

MagicScraper

Scrapes and displays data from the web page based on rules.

当前为 2023-07-20 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/471264/1222741/MagicScraper.js

作者
aolko
版本
0.1
创建于
2023-07-20
更新于
2023-07-20
大小
3.3 KB
许可证
暂无

Define your rules object (either inline or external)

const rules = {
  // Your rules object here
};

Define the options

const options = {
  keepChildren: false, // Set to true if you want to retain children of scraped elements
};

Call the scraper function with the rules object or the external URL.

scraper(rules, options);
// OR
scraper('https://example.com/rules.json', options);