提取finder.susy.mdpi.com

提取 https://finder.susy.mdpi.com/reviewer

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         提取finder.susy.mdpi.com
// @namespace    https://greasyfork.org/zh-CN/scripts/495851-%E6%8F%90%E5%8F%96finder-susy-mdpi-com
// @version      v1.1.0
// @description  提取 https://finder.susy.mdpi.com/reviewer
// @author       Cheese-Yu
// @match        https://finder.susy.mdpi.com/reviewer*
// @icon         https://finder.susy.mdpi.com/dist/images/ico/favicon.ico?5
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    try {
        const formtVal = (text) => {
            return text.replace(/\n/g, '').trim()
        }
        // statements
        const list = document.querySelectorAll('.job-ad-item');
        const result = [];
        for (let i = 0; i < list.length; i++) {
            const el = list[i];
            const Title = el.querySelector('.title').textContent;
            const Email = el.querySelector('.clipboard').getAttribute('data-clipboard-text');
            const textList = el.querySelector('.highlight-text').children;
            const textObj = {};
            for (let j = 0; j < textList.length; j++) {
            	let text = textList[j].textContent;
            	let key = text.split(':')[0];
            	if (textList[j].querySelector('.show-more-section')) {
            		key = formtVal(textList[j].querySelector('b').textContent?.replace(':',''));
            		text = textList[j].querySelector('.show-more-section').textContent;
            	}
            	// console.log(text);
            	textObj[key] = formtVal(text.replace(`${key}:`, ''))
            }
            const infoList = el.querySelectorAll('li');
            const locationText = infoList[0]?.textContent || '';
            const Location = formtVal(locationText?.split('\n')[1]);
            const HIndex = formtVal(infoList[0].querySelector('a')?.textContent);
            const Link = infoList[1]?.querySelector('a').textContent || '';
            result.push({
                Title,
                Email,
                ...textObj,
                Location,
                HIndex,
                Link
            });

        }
        console.log(`%c提取结果:url-${location.href}`, 'color: red', result);
    } catch(e) {
        // statements
        console.log('提取失败', e);
    }
})();