├── README.md ├── assets └── demo │ └── gif │ └── demo1.gif └── 电影信息查询脚本.js /README.md: -------------------------------------------------------------------------------- 1 | # 电影信息查询脚本 2 | 3 | ## :book: 介绍 Introduction 4 | 5 | 本脚本用于在豆瓣电影页面(如:[肖申克的救赎 (豆瓣)](https://movie.douban.com/subject/1292052/))获取电影信息,多用于各大 PT 站点发布种子填写介绍。与主流格式(PT-Gen)基本一致。 6 | 7 | ## :balloon: 特性 Features 8 | 9 | - 纯前端处理,无托管服务器,本获取信息服务无访问次数限制; 10 | 11 | - 使用 [IMDb 官方插件接口](https://www.imdb.com/plugins)(支持 JSONP 跨域获取,虽然用户脚本可以不考虑跨域问题)获取评分,相比于 OMDb,无需 API Key,分数获取迅速,更新及时(1次/24h); 12 | 13 | `https://p.media-imdb.com/static-content/documents/v1/title/tt${ID}/ratings%3Fjsonp=imdb.rating.run:imdb.api.title.ratings/data.json` 14 | 15 | - 考虑到豆瓣的 API 极其不稳定并有下线的可能性,本脚本尽量避免了对豆瓣 API 的调用,以避免对其过多的依赖; 16 | 17 | 最新情况:[豆瓣 API 疑似彻底下线](https://v2ex.com/t/699393),所有已知的公开 API Key 均报错:`code: 109, msg: "invalid_credencial2"` 18 | 19 | - 部分豆瓣条目需用户登录后才能访问,登录豆瓣账户后使用本脚本即可获取相应条目信息; 20 | 21 | - 丰富了演职员列表信息,包括饰演、配音数据,皆从豆瓣爬取; 22 | 23 | - 自动获取时光网对应电影条目的**幕后揭秘**信息。 24 | 25 | ## :dart: 待办 TODOs 26 | 27 | - [ ] 主要进行一些维护工作,新功能视情况增加。 28 | 29 | ## :roller_coaster: 演示 Demo 30 | 31 | ![demo1](https://raw.githubusercontent.com/Sec-ant/MovieInfoGen/master/assets/demo/gif/demo1.gif) 32 | 33 | ## :hammer_and_wrench: 安装 Installation 34 | 35 | 请到 [Greasy Fork](https://greasyfork.org/zh-CN/scripts/38878-%E7%94%B5%E5%BD%B1%E4%BF%A1%E6%81%AF%E6%9F%A5%E8%AF%A2%E8%84%9A%E6%9C%AC) 页面,配合 [Tampermonkey](https://www.tampermonkey.net/) 浏览器扩展安装使用。 36 | 37 | ## :building_construction: 贡献 Contribution 38 | 39 | 本脚本暂时不开放多人编辑权限,如有问题和想法请先到 [Greasy Fork 反馈页面](https://greasyfork.org/zh-CN/scripts/38878-%E7%94%B5%E5%BD%B1%E4%BF%A1%E6%81%AF%E6%9F%A5%E8%AF%A2%E8%84%9A%E6%9C%AC/feedback)或 [Github Issues 页面](https://github.com/Sec-ant/MovieInfoGen/issues)提交。 40 | 41 | ## :copyright: 许可 License 42 | 43 | [GNU General Public License v3.0 or later](https://spdx.org/licenses/GPL-3.0-or-later.html) 44 | 45 | ## :mailbox: 邮箱 Email 46 | 47 | zzwu@zju.edu.cn 48 | 49 | ## :heart: 捐赠 Donation 50 | 51 | 52 |
支付宝 Alipay微信 Wechat
53 | -------------------------------------------------------------------------------- /assets/demo/gif/demo1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3xusHD/MovieInfoGen/af4f6a3df54f185aae7a5e05829236987be76df7/assets/demo/gif/demo1.gif -------------------------------------------------------------------------------- /电影信息查询脚本.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name 电影信息查询脚本 3 | // @description Fetch Douban Description, IMDb information for PT upload 4 | // @version 3.7.10 5 | // @author Secant(TYT@NexusHD) 6 | // @include http*://movie.douban.com/subject/* 7 | // @require https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js 8 | // @icon https://movie.douban.com/favicon.ico 9 | // @contributionURL https://i.loli.net/2020/02/28/JPGgHc3UMwXedhv.jpg 10 | // @contributionAmount 10 11 | // @namespace https://greasyfork.org/users/152136 12 | // @grant GM_xmlhttpRequest 13 | // @connect front-gateway.mtime.cn 14 | // @connect api.douban.com 15 | // @connect proxy.secant.workers.dev 16 | // @connect p.media-imdb.com 17 | // ==/UserScript== 18 | 19 | /*jshint esversion: 8 */ 20 | 21 | (function ($) { 22 | const a = [ 23 | "MGIyYmRlZGE0M2I1Njg4OTI=", 24 | "MGRhZDU1MWVjMGY4NGVkMDI=", 25 | "OTA3ZmY1YzQyZThlYzcw", 26 | "MDI2NDZkM2ZiNjlhNTJmZjA=", 27 | "MTgzOWM4ZWNiMjAzOTli", 28 | "NzJkNDdiZjIzY2VmOGZk", 29 | "OWVjYmI1MzQ0MjUyYTRh", 30 | "MGRmOTkzYzY2YzBjNjM2ZTI=", 31 | ]; 32 | (function (b, e) { 33 | const f = function (g) { 34 | while (--g) { 35 | b.push(b.shift()); 36 | } 37 | }; 38 | f(++e); 39 | })(a, 0x1e4); 40 | const b = function (c, d) { 41 | c = c - 0x0; 42 | let e = a[c]; 43 | if (b.pbhcos === undefined) { 44 | (function () { 45 | const g = 46 | typeof window !== "undefined" 47 | ? window 48 | : typeof process === "object" && 49 | typeof require === "function" && 50 | typeof global === "object" 51 | ? global 52 | : this; 53 | const h = 54 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 55 | g.atob || 56 | (g.atob = function (i) { 57 | const j = String(i).replace(/=+$/, ""); 58 | let k = ""; 59 | for ( 60 | let l = 0x0, m, n, o = 0x0; 61 | (n = j.charAt(o++)); 62 | ~n && ((m = l % 0x4 ? m * 0x40 + n : n), l++ % 0x4) 63 | ? (k += String.fromCharCode( 64 | 0xff & (m >> ((-0x2 * l) & 0x6)) 65 | )) 66 | : 0x0 67 | ) { 68 | n = h.indexOf(n); 69 | } 70 | return k; 71 | }); 72 | })(); 73 | b.ICpnUS = function (g) { 74 | const h = atob(g); 75 | let j = []; 76 | for (let k = 0x0, l = h.length; k < l; k++) { 77 | j += 78 | "%" + ("00" + h.charCodeAt(k).toString(0x10)).slice(-0x2); 79 | } 80 | return decodeURIComponent(j); 81 | }; 82 | b.Snsmje = {}; 83 | b.pbhcos = !![]; 84 | } 85 | const f = b.Snsmje[c]; 86 | if (f === undefined) { 87 | e = b.ICpnUS(e); 88 | b.Snsmje[c] = e; 89 | } else { 90 | e = f; 91 | } 92 | return e; 93 | }; 94 | const DoubanAPIKeys = [ 95 | b("0x7") + b("0x1"), 96 | b("0x5") + b("0x6"), 97 | b("0x4") + b("0x0"), 98 | b("0x3") + b("0x2"), 99 | ]; 100 | const TIMEOUT = 6000; 101 | const $toggle = $('描述文本:'); 102 | const $infoGen = $('获取'); 103 | const $message = $(''); 104 | const $copyPaste = $('