// ==UserScript== // @name 10漫画下载 // @namespace http://tampermonkey2.net/ // @version 1.1.0 // @description 漫画分章节压缩下载。适用于 酷漫屋、百漫谷、武侠漫画、动漫之家、七夕漫画、36漫画网、古风漫画网、腾讯漫画、漫画星球、好漫8、漫画屋、27漫画网 // @author journey3510 // @run-at document-end // @grant GM_getValue // @grant GM_setValue // @grant GM_setClipboard // @grant GM_info // @grant GM_xmlhttpRequest // @grant GM_addStyle // @grant GM_getResourceText // @grant GM.getValue // @grant GM.setValue // @grant GM.setClipboard // @grant GM.info // @grant GM.xmlHttpRequest // @resource vantcss https://unpkg.com/vant@2.12/lib/index.css // @require https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js // @require https://cdn.bootcdn.net/ajax/libs/jszip/3.7.1/jszip.min.js // @require https://unpkg.com/vant@2.12/lib/vant.min.js // // @match *://www.kumw5.com/* // @connect kumw5.com // // @match *://darpou.com/* // @connect manga8.xyz // // @match *://m.wuxiamh.com/* // @match *://www.wuxiamh.com/* // @connect 169gouwu.com // // @match *://manhua.dmzj.com/* // @connect dmzj.com // // @match *://qiximh1.com/* // @connect byteimg.com // // @match *://www.36manga.com/* // // @match *://www.gufengmanhua.com/* // @connect gufengmanhua.com // @match *://www.123gf.com/* // @connect 123gf.com // // @match *://ac.qq.com/* // @connect acimg.cn // // @match *://www.mhxqiu1.com/* // @connect byteimg.com // // @match *://www.haoman8.com/* // @connect haoman8.com // // @match *://www.mh5.org/* // @connect xiaomingtaiji.net // // @match *://www.2mzx.com/* // @connect 2mzx.com // @connect hnsrht.com // @connect huayingrenren.cn // // @connect * // @connect arc-theday.com // @connect xiaoqinre.com // @connect laimidao.com // @connect izhegu.com // @connect nicefee.com // @license MIT // @downloadURL none // ==/UserScript== /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 14); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getWebList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return currentComics; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return matchWeb; }); /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* eslint-disable no-undef */ /* eslint-disable no-empty */ /* eslint-disable no-eval */ const comicsWebInfo = [ { domain: 'manhua.dmzj.com', homepage: 'https://manhua.dmzj.com/', webName: '动漫之家', comicNameCss: '.odd_anim_title_m .anim_title_text h1', chapterCss: '.cartoon_online_border', type: 1, getImgs: async function(context) { const group = context.matchAll(/(function[\s\S]+?return \S})(\([\s\S]+?{}\))/g) const func = [] for (const item of group) { func.push(item[1]) func.push(item[2]) } const code = '(' + func[0] + ')' + func[1] let imgStr = eval(code) imgStr = imgStr.match(/\[[\s\S]+?\]/)[0] let imgArray = JSON.parse(imgStr) if (imgArray[0].search('http') === -1) { imgArray = imgArray.map((item) => { return 'https://images.dmzj.com/' + item }) } return imgArray } }, { domain: 'www.kumw5.com', homepage: 'http://www.kumw5.com/', webName: '酷漫屋', comicNameCss: '.info h1', chapterCss: '#detail-list-select-1', type: 1, getImgs: function(context) { const reg = /var km[^>]*_img_url='[^>]*'/gi const s1 = context.match(reg) const base64Context = s1[0].match(/'(\S*)'/)[1] let imgstr = window.atob(base64Context) imgstr = eval(imgstr).toString() const imgArray = imgstr.matchAll(/(http[\s\S]+?),/g) const imgUrl = [] for (const item of imgArray) { imgUrl.push(item[1]) } return imgUrl } }, { domain: 'darpou.com', homepage: 'https://darpou.com/', webName: '百漫谷', comicNameCss: '.fed-part-eone.fed-font-xvi a', chapterCss: '.fed-play-item.fed-drop-item.fed-visible .fed-part-rows:nth-child(2)', type: 1, getImgs: async function(context) { const txtUrl = context.match(/http(\S*).txt/gi)[0] const txtRes = await Object(_utils_index__WEBPACK_IMPORTED_MODULE_0__[/* request */ "c"])('get', txtUrl) const txtContext = txtRes.responseText const imgReg = /http(\S*)jpg/g return txtContext.match(imgReg) } }, { domain: 'm.wuxiamh.com', homepage: 'https://m.wuxiamh.com/', webName: '武侠漫画(手机)', comicNameCss: '.view-sub.autoHeight .title', chapterCss: '#chapter-list-1', type: 0, nextpageRgeCss: '.action-list li:nth-child(3) a', getImgs: async function(context) { const imgobj = context.matchAll(/>(\d+)<\/span>/)[1] const context1 = context.match(/class="action-list">[\s\S]+?下一页/g)[0] let nextPageUrl = context1.match(/http(\S*)html/g)[2] nextPageUrl = nextPageUrl.indexOf('-') !== -1 ? nextPageUrl : '' return { imgUrl, nextPageUrl, number } } }, { domain: 'www.wuxiamh.com', homepage: 'https://www.wuxiamh.com/', webName: '武侠漫画网(电脑)', comicNameCss: '.title h1', chapterCss: '#chapter-list-1', type: 1, getImgs: async function(context) { const imgStr = context.match(/var chapterImages = ([[\s\S]+?])[\s\S]+?var chapterPath/)[1] const imgs = eval(imgStr) return imgs } }, { domain: 'qiximh1.com', homepage: 'http://qiximh1.com', webName: '七夕漫画', comicNameCss: '.comic_name .name', chapterCss: '.catalog_list.row_catalog_list', type: 1, getImgs: function(context) { const group = context.matchAll(/(function[\s\S]+?return \S})(\([\s\S]+?{}\))/g) const func = [] for (const item of group) { func.push(item[1]) func.push(item[2]) } const code = '(' + func[0] + ')' + func[1] let imgStr = eval(code) imgStr = imgStr.match(/\[[\s\S]+?\]/)[0] const imgArray = JSON.parse(imgStr) return imgArray } }, { domain: 'www.36manga.com', homepage: 'https://www.36manga.com/', webName: '36漫画网', comicNameCss: '.book-title h1 span', chapterCss: '#chapter-list-4 li:not(:first-of-type)', type: 1, getImgs: function(context) { const group = context.matchAll(/chapterImages = ([\s\S]+?);var chapterPath = "([\s\S]+?)";var chapterPrice/g) let imgarr = [] let middleStr = '' for (const item of group) { imgarr = JSON.parse(item[1]) middleStr = item[2] } if (imgarr[0].search('http') === -1) { imgarr = imgarr.map((item) => { return 'https://img001.arc-theday.com/' + middleStr + item }) } return imgarr } }, { domain: 'www.gufengmanhua.com', homepage: 'https://www.gufengmanhua.com/', webName: '古风漫画网', comicNameCss: '.book-title h1 span', chapterCss: '#chapter-list-1,#chapter-list-10', type: 1, getImgs: function(context) { const imgStr = context.match(/chapterImages = ([\s\S]+?);var chapterPath/)[1] let imgarr = JSON.parse(imgStr) if (imgarr[0].search('http') === -1) { imgarr = imgarr.map((item) => { return 'https://res5.gufengmanhua.com' + item }) } return imgarr } }, { domain: 'www.123gf.com', homepage: 'https://www.123gf.com/', webName: '古风漫画网 2', comicNameCss: '.book-title h1 span', chapterCss: '#chapter-list-1,#chapter-list-10', type: 1, getImgs: async function(context) { const group = context.matchAll(/chapterImages = (.*?);var chapterPath = "(.*?)"/g) const strArr = [] for (const item of group) { strArr.push(item[1]) strArr.push(item[2]) } const josnRes = await Object(_utils_index__WEBPACK_IMPORTED_MODULE_0__[/* request */ "c"])('get', this.homepage + 'js/config.js') const josnContext = josnRes.responseText const imageDomian = josnContext.match(/"domain":\["(.*?)"]/)[1] let imgarr = JSON.parse(strArr[0]) if (imgarr[0].search('http') === -1) { imgarr = imgarr.map((item) => { return imageDomian + '/' + strArr[1] + item }) } return imgarr } }, { domain: 'ac.qq.com', homepage: 'https://ac.qq.com/', webName: '腾讯漫画', comicNameCss: '.works-intro-title.ui-left strong', chapterCss: '.chapter-page-all.works-chapter-list', type: 1, hasSpend: true, freeCss: '.ui-icon-free', payCss: '.ui-icon-pay', getImgs: function(context) { let nonce = context.match(/