arXiv Link Downloader

Download arXiv links as an Excel file

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         arXiv Link Downloader
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Download arXiv links as an Excel file
// @author       You
// @match        https://arxiv.org/search/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create a button to trigger the link download
    const button = document.createElement('button');
    button.textContent = 'arXiv Links\n一键下载';
    button.style.position = 'fixed';
    button.style.top = '120px';
    button.style.right = '10px';
    button.style.zIndex = 1000;
    document.body.appendChild(button);

    // Function to extract links and create Excel content
    function downloadLinks() {
        const links = document.querySelectorAll('li.arxiv-result .list-title a[href^="https://arxiv.org/abs/"]');
        let excelContent = "Link\n";

        links.forEach(link => {
            const url = link.href.trim();
            excelContent += `"${url}"\n`;
        });

        // Create a Blob object with Excel content
        const blob = new Blob([excelContent], { type: 'text/csv;charset=utf-8;' });
        const blobURL = URL.createObjectURL(blob);

        // Create a temporary link to trigger the download
        const tempLink = document.createElement('a');
        tempLink.href = blobURL;
        tempLink.setAttribute('download', 'arxiv_links.csv');
        document.body.appendChild(tempLink);
        tempLink.click();
        document.body.removeChild(tempLink);
    }

    // Add event listener to the button
    button.addEventListener('click', downloadLinks);
})();

QingJ © 2025

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