Token导航 LogoToken导航

Agent Skill · 研究检索

academic-web-scraping(学术网络抓取)

academic-web-scraping 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

academic-web-scraping 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 68,884。

总安装 222周安装 9GitHub Stars 209下载 70核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:academic-web-scraping(学术网络抓取)
来源仓库:https://github.com/wentorai/research-plugins
仓库路径:skills/academic-web-scraping
安装命令:
npx skills add https://github.com/wentorai/research-plugins --skill academic-web-scraping
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wentorai/research-plugins --skill academic-web-scraping

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

学术网络抓取指南帮助研究者从网页或 API 收集数据,支持文献元数据、实验数据集等科研用途。涵盖结构化 API 访问与非 API 情况下的网页抓取技术,强调伦理合规与速率控制。提供 robots.txt 遵守、服务条款合规及 IRB 审查等方面的实践建议。

安装前请确认权限范围、维护状态,以及是否会触发联网或命令执行操作。建议结合原始 README 和仓库内容进一步核验具体用法和功能边界。

来源仓库内路径:skills/academic-web-scraping

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wentorai/research-plugins --skill academic-web…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

academic-web-scraping 怎么安装?

在终端执行 npx skills add https://github.com/wentorai/research-plugins --skill academic-web-scraping。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

academic-web-scraping 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

academic-web-scraping 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

academic-web-scraping 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

academic-web-scraping 用的人多吗?

公开数据是累计安装 222 次,近一周安装 9 次,下载 70 次,GitHub 209 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

academic-web-scraping 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
academic-web-scraping

学术网络抓取 · 本页

222209接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Academic Web Scraping Guide

Overview

Research often requires collecting data from the web -- whether it is bibliographic metadata from academic databases, experimental datasets from public repositories, social media posts for computational social science, or economic indicators from government portals. Web scraping and API-based data collection are essential skills for modern researchers across disciplines.

This guide covers both approaches: structured API access for platforms that provide one, and web scraping for when no API exists. It emphasizes ethical data collection practices, including respecting robots.txt, rate limiting, terms of service compliance, and IRB considerations for human-subject data. The goal is to collect research data reliably and responsibly.

Whether you are building a dataset for a machine learning paper, collecting metadata for a systematic review, or gathering public data for policy research, these patterns help you do it correctly and efficiently.

API-Based Data Collection

APIs are always preferable to scraping when available. They provide structured data, are officially supported, and have clear usage terms.

Academic APIs

APIDataRate LimitAuth
OpenAlexPapers, authors, venues, concepts100K req/dayEmail in header
CrossrefDOI metadata50 req/sec (polite pool)Email in header
PubMed (Entrez)Biomedical literature10 req/sec (with key)API key (free)
arXivPreprints1 req/3secNone
COREOpen access papers10 req/secAPI key (free)

Example: Collecting Papers from OpenAlex

import requests
import time

class OpenAlexClient:
    BASE_URL = "https://api.openalex.org"

    def __init__(self, email):
        self.session = requests.Session()
        self.session.headers.update({
            'User-Agent': f'ResearchBot/1.0 (mailto:{email})'
        })

    def search_works(self, query, filters=None, per_page=25, max_results=100):
        """Search for works with optional filters."""
        results = []
        page = 1

        while len(results) < max_results:
            params = {
                'search': query,
                'per_page': min(per_page, max_results - len(results)),
                'page': page,
            }
            if filters:
                params['filter'] = ','.join(f'{k}:{v}' for k, v in filters.items())

            resp = self.session.get(f'{self.BASE_URL}/works', params=params)
            resp.raise_for_status()
            data = resp.json()

            works = data.get('results', [])
            if not works:
                break

            results.extend(works)
            page += 1
            time.sleep(0.1)  # Polite rate limiting

        return results[:max_results]

    def get_work(self, openalex_id):
        """Get a single work by OpenAlex ID."""
        resp = self.session.get(f'{self.BASE_URL}/works/{openalex_id}')
        resp.raise_for_status()
        return resp.json()

# Usage
client = OpenAlexClient(email="researcher@university.edu")
papers = client.search_works(
    "transformer attention mechanism",
    filters={
        'publication_year': '2023-2024',
        'type': 'journal-article',
        'open_access.is_oa': 'true'
    },
    max_results=200
)

for paper in papers[:5]:
    print(f"- {paper['title']} ({paper['publication_year']})")
    print(f"  DOI: {paper['doi']}")
    print(f"  Citations: {paper['cited_by_count']}")

Example: PubMed Entrez API

from Bio import Entrez

Entrez.email = "researcher@university.edu"
Entrez.api_key = os.environ.get("NCBI_API_KEY")  # optional

def search_pubmed(query, max_results=100):
    """Search PubMed and retrieve article details."""
    # Search
    handle = Entrez.esearch(db="pubmed", term=query,
                            retmax=max_results, sort="relevance")
    search_results = Entrez.read(handle)
    id_list = search_results["IdList"]

    if not id_list:
        return []

    # Fetch details
    handle = Entrez.efetch(db="pubmed", id=id_list,
                           rettype="xml", retmode="xml")
    records = Entrez.read(handle)

    articles = []
    for article in records['PubmedArticle']:
        medline = article['MedlineCitation']
        art_info = medline['Article']
        articles.append({
            'pmid': str(medline['PMID']),
            'title': art_info.get('ArticleTitle', ''),
            'abstract': art_info.get('Abstract', {}).get(
                'AbstractText', [''])[0] if 'Abstract' in art_info else '',
            'journal': art_info['Journal']['Title'],
            'year': art_info['Journal']['JournalIssue'].get(
                'PubDate', {}).get('Year', ''),
        })

    return articles

Web Scraping Fundamentals

When no API exists, scraping becomes necessary. Always check for an API first.

Tools Comparison

ToolTypeJavaScript SupportSpeedLearning Curve
requests + BeautifulSoupHTTP + parsingNoFastLow
ScrapyFrameworkNo (without middleware)Very fastMedium
SeleniumBrowser automationYesSlowMedium
PlaywrightBrowser automationYesMediumMedium
httpxAsync HTTPNoVery fastLow

Basic Scraping with BeautifulSoup

import requests
from bs4 import BeautifulSoup
import time

def scrape_conference_proceedings(url, delay=2.0):
    """Scrape paper titles and links from a conference page."""
    headers = {
        'User-Agent': 'ResearchBot/1.0 (Academic research; contact@university.edu)'
    }

    response = requests.get(url, headers=headers, timeout=30)
    response.raise_for_status()

    soup = BeautifulSoup(response.text, 'html.parser')

    papers = []
    for item in soup.select('.paper-item, .proceeding-entry'):
        title_el = item.select_one('.title, h3, h4')
        link_el = item.select_one('a[href]')
        authors_el = item.select_one('.authors, .author-list')

        if title_el:
            papers.append({
                'title': title_el.get_text(strip=True),
                'url': link_el['href'] if link_el else None,
                'authors': authors_el.get_text(strip=True) if authors_el else '',
            })

    time.sleep(delay)  # Respect the server
    return papers

Handling JavaScript-Rendered Pages

from playwright.sync_api import sync_playwright

def scrape_dynamic_page(url):
    """Scrape a JavaScript-rendered page using Playwright."""
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page()
        page.goto(url, wait_until='networkidle')

        # Wait for content to load
        page.wait_for_selector('.results-container', timeout=10000)

        # Extract data
        items = page.query_selector_all('.result-item')
        results = []
        for item in items:
            title = item.query_selector('.title')
            results.append({
                'title': title.inner_text() if title else '',
            })

        browser.close()
        return results

Ethical Guidelines

The Researcher's Scraping Checklist

  1. Check for an API first. Most academic platforms have one.
  2. Read robots.txt. https://example.com/robots.txt specifies what is allowed.
  3. Review Terms of Service. Some sites explicitly prohibit scraping.
  4. Rate limit aggressively. 1 request per 2-5 seconds minimum. Never parallelize without permission.
  5. Identify yourself. Include your email and institution in the User-Agent header.
  6. Minimize data collection. Only collect what your research question requires.
  7. Consider IRB requirements. If collecting data about identifiable humans, consult your IRB.
  8. Store data securely. Follow your institution's data management policies.
  9. Cite your data sources. Acknowledge where the data came from in your publications.
  10. Check copyright. Scraping publicly visible data does not mean you can redistribute it.

robots.txt Parsing

from urllib.robotparser import RobotFileParser

def can_scrape(url, user_agent='*'):
    """Check if scraping a URL is allowed by robots.txt."""
    from urllib.parse import urlparse
    parsed = urlparse(url)
    robots_url = f"{parsed.scheme}://{parsed.netloc}/robots.txt"

    rp = RobotFileParser()
    rp.set_url(robots_url)
    rp.read()

    allowed = rp.can_fetch(user_agent, url)
    crawl_delay = rp.crawl_delay(user_agent)

    return {
        'allowed': allowed,
        'crawl_delay': crawl_delay or 1.0,
    }

Data Storage and Export

Saving Results Reliably

import json
import csv
from pathlib import Path
from datetime import datetime

class DataCollector:
    def __init__(self, output_dir='collected_data'):
        self.output_dir = Path(output_dir)
        self.output_dir.mkdir(parents=True, exist_ok=True)
        self.timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')

    def save_json(self, data, filename):
        path = self.output_dir / f'{filename}_{self.timestamp}.json'
        with open(path, 'w', encoding='utf-8') as f:
            json.dump(data, f, indent=2, ensure_ascii=False)
        print(f"Saved {len(data)} records to {path}")

    def save_csv(self, data, filename, fieldnames=None):
        if not data:
            return
        if fieldnames is None:
            fieldnames = list(data[0].keys())

        path = self.output_dir / f'{filename}_{self.timestamp}.csv'
        with open(path, 'w', newline='', encoding='utf-8') as f:
            writer = csv.DictWriter(f, fieldnames=fieldnames,
                                     extrasaction='ignore')
            writer.writeheader()
            writer.writerows(data)
        print(f"Saved {len(data)} records to {path}")

    def save_checkpoint(self, data, filename):
        """Save intermediate results for resumable collection."""
        path = self.output_dir / f'{filename}_checkpoint.json'
        with open(path, 'w', encoding='utf-8') as f:
            json.dump({
                'timestamp': self.timestamp,
                'n_records': len(data),
                'data': data,
            }, f, indent=2, ensure_ascii=False)

Best Practices

  • Always prefer APIs over scraping. APIs are more reliable, structured, and legally clear.
  • Implement exponential backoff. If a request fails, wait 1s, then 2s, then 4s before retrying.
  • Save checkpoints. For large collections, save progress incrementally so you can resume after interruptions.
  • Log everything. Record which URLs were accessed, when, and what was returned for reproducibility.
  • Test on a small sample first. Verify your parsing logic on 10 records before running on 10,000.
  • Respect rate limits. Getting blocked hurts everyone -- other researchers included.
  • Document your collection methodology. Your paper's Methods section should describe how data was collected, when, and what filters were applied.

References

平台分布

Codex

35.83%
按下载量换算25

Claude

30.52%
按下载量换算21

Cursor

20.73%
按下载量换算15

Gemini CLI

10.43%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills