24 |
电影信息
25 |
26 |
导演: ${data.director}
27 |
类型: ${data.genre}
28 |
制片国家/地区: ${data.region}
29 |
语言: ${data.language}
30 |
时长: ${data.runtime}
31 |
又名: ${data.aka}
获奖情况: ${data.awards}
`);
34 | if (data.average) {
35 | $('#movie-ratings-table tr').prepend(
36 | `
37 |
38 |
39 |
40 | 豆
41 | 豆瓣评分
42 |
43 |
44 |
45 | |
46 |
47 | ${data.average}
48 | /
49 | 10
50 | (${data.votes} votes) | `);
51 | }
52 | };
53 | const addToANTPage = (data) => {
54 | console.log(data);
55 | $('.header h2').prepend(`
[${data.chineseTitle}] `);
56 | if (data.summary) {
57 | const synopsisDom = `
58 |
59 |
60 |
${data.summary}
61 |
`;
62 | $('.torrent_description,.box_request_desc').after(synopsisDom);
63 | }
64 | $('.box_details:first').before(`
65 |
66 |
电影信息
67 |
68 |
69 | - 导演: ${data.director}
70 | - 类型: ${data.genre}
71 | - 制片国家/地区: ${data.region}
72 | - 语言: ${data.language}
73 | - 时长: ${data.runtime}
74 | - 又名: ${data.aka}
获奖情况:
${data.awards}
77 |
78 |
`);
79 | if (data.average) {
80 | $('.box.torrent_ratings .body tr').prepend(
81 | `
82 |
83 |
84 |
85 | 豆
86 |
87 |
88 |
89 | |
90 |
91 | ${data.average}
92 | /
93 | 10
94 | (${data.votes} votes) | `);
95 | }
96 | };
97 | const getImdbId = () => {
98 | let imdbLink = '';
99 | const imdbConfig = CURRENT_SITE_INFO.imdb;
100 | if (typeof imdbConfig === 'object') {
101 | try {
102 | Object.keys(imdbConfig).forEach(key => {
103 | if ($(`${imdbConfig[key]}`)[0]) {
104 | imdbLink = $(imdbConfig[key]).attr('href');
105 | throw new Error('end loop');
106 | }
107 | });
108 | } catch (error) {
109 | if (error.message !== 'end loop') {
110 | console.log(error);
111 | }
112 | }
113 | } else {
114 | imdbLink = $(imdbConfig).attr('href');
115 | }
116 | console.log(imdbLink);
117 | return /tt\d+/.exec(imdbLink)?.[0] ?? '';
118 | };
119 | const getDoubanId = async (imdbId) => {
120 | try {
121 | const url = DOUBAN_SEARCH_API.replace('{query}', imdbId);
122 | const res = await fetch(url, {
123 | responseType: 'json',
124 | });
125 | if (res && res.length > 0 && res[0].id) {
126 | const { id, title, episode } = res[0];
127 | return {
128 | id,
129 | season: episode,
130 | title,
131 | };
132 | }
133 | } catch (error) {
134 | console.log(error);
135 | }
136 | };
137 | const getDoubanIdByIMDB = async (imdbId) => {
138 | try {
139 | const url = DOUBAN_SUGGEST_API.replace('{query}', imdbId);
140 | const options = {
141 | cookie: '',
142 | anonymous: false,
143 | responseType: undefined,
144 | };
145 | const data = await fetch(url, options);
146 | const doc = new DOMParser().parseFromString(data, 'text/html');
147 | const linkDom = doc.querySelector('.result-list .result h3 a');
148 | if (!linkDom) {
149 | throw new Error('豆瓣ID获取失败');
150 | } else {
151 | const { href, textContent } = linkDom;
152 | const season = textContent?.match(/第(.+?)季/)?.[1] ?? '';
153 | const doubanId = decodeURIComponent(href).match(/subject\/(\d+)/)?.[1] ?? '';
154 | return ({
155 | id: doubanId,
156 | season,
157 | title: textContent || '',
158 | });
159 | }
160 | } catch (error) {
161 | throw new Error(error.message);
162 | }
163 | };
164 | // const getTvSeasonData = (data) => {
165 | // const torrentTitle = getTorrentTitle();
166 | // return new Promise((resolve, reject) => {
167 | // const { season = '', title } = data;
168 | // if (season) {
169 | // const seasonNumber = torrentTitle.match(/S(?!eason)\s*?0?(\d+)\.?(EP?\d+)?/i)?.[1] ?? 1;
170 | // if (parseInt(seasonNumber) === 1) {
171 | // resolve(data);
172 | // } else {
173 | // const query = title.replace(/第.+?季/, `第${seasonNumber}季`);
174 | // getDoubanId(query).then(data => {
175 | // resolve(data);
176 | // });
177 | // }
178 | // }
179 | // });
180 | // };
181 | const getTvSeasonData = async (data) => {
182 | const torrentTitle = getTorrentTitle();
183 | const { episodes = '', chineseTitle } = data;
184 | if (episodes) {
185 | const seasonNumber = torrentTitle.match(/S(?!eason)\s*?0?(\d+)\.?(EP?\d+)?/i)?.[1] ?? 1;
186 | if (parseInt(seasonNumber) === 1) {
187 | return data;
188 | } else {
189 | const query = `${chineseTitle} 第${seasonNumber}季`;
190 | const params = encodeURI('apikey=0ab215a8b1977939201640fa14c66bab');
191 | const searchData = await fetch(`${DOUBAN_API_URL}/search?q=${query}`, {
192 | data: params,
193 | method: 'POST',
194 | headers: {
195 | 'Content-Type': 'application/x-www-form-urlencoded',
196 | },
197 | });
198 | if (searchData.count > 0) {
199 | return { id: searchData.subjects[0].id };
200 | }
201 | }
202 | }
203 | };
204 | const getDoubanInfo = async (doubanId, imdbId) => {
205 | try {
206 | const url = DOUBAN_SUBJECT_URL.replace('{doubanId}', doubanId);
207 | const data = await fetch(url, {
208 | responseType: 'text',
209 | });
210 | if (data) {
211 | const doubanInfo = await formatDoubanInfo(data);
212 | const savedIds = GM_getValue('ids') || {};
213 | savedIds[imdbId] = {
214 | doubanId,
215 | updateTime: Date.now(),
216 | ...doubanInfo,
217 | };
218 | GM_setValue('ids', savedIds);
219 | return doubanInfo;
220 | } else {
221 | console.log('豆瓣数据获取失败');
222 | }
223 | } catch (error) {
224 | console.log(error);
225 | }
226 | };
227 | const getDoubanInfoByIMDB = async (imdbId) => {
228 | try {
229 | const params = encodeURI('apikey=0ab215a8b1977939201640fa14c66bab');
230 | const doubanData = await fetch(`${DOUBAN_API_URL}/imdb/${imdbId}`, {
231 | data: params,
232 | method: 'POST',
233 | headers: {
234 | 'Content-Type': 'application/x-www-form-urlencoded',
235 | },
236 | });
237 | const { title, attrs = {}, image, summary, rating, alt_title: altTitle, mobile_link: mobileLink } = doubanData;
238 | let chineseTitle = title;
239 | const isChineseReg = /[\u4e00-\u9fa5]+/;
240 | if (!isChineseReg.test(title) && !title.match(/^\d+$/)) {
241 | if (altTitle) {
242 | chineseTitle = altTitle.split('/')[0].trim();
243 | } else {
244 | chineseTitle = title;
245 | }
246 | }
247 | const subjectLink = mobileLink.replace('m.douban.com/movie', 'movie.douban.com').replace(/\/$/, '');
248 | const doubanId = subjectLink.match(/subject\/(\d+)/)?.[1] ?? '';
249 | const awards = await getAwardInfo(subjectLink);
250 | const doubanInfo = {
251 | director: attrs.director?.join(' / '),
252 | runtime: attrs.movie_duration?.join(' / '),
253 | language: attrs.language?.join(' / '),
254 | genre: attrs.movie_type?.join(' / ') ?? '',
255 | aka: altTitle || '',
256 | region: attrs.country?.join(' / '),
257 | link: subjectLink,
258 | poster: image,
259 | summary,
260 | chineseTitle,
261 | votes: rating.numRaters,
262 | average: rating.average,
263 | awards: awards,
264 | id: subjectLink.match(/subject\/(\d+)/)?.[1] ?? '',
265 | episodes: attrs.episodes?.join(' / ') ?? '',
266 | };
267 | // no need to save series info
268 | if (!attrs.episodes) {
269 | const savedIds = GM_getValue('ids') || {};
270 | savedIds[imdbId] = {
271 | doubanId,
272 | updateTime: Date.now(),
273 | ...doubanInfo,
274 | };
275 | GM_setValue('ids', savedIds);
276 | }
277 | return doubanInfo;
278 | } catch (error) {
279 | console.log(error);
280 | }
281 | };
282 | const getAwardInfo = async (doubanLink) => {
283 | const awardsPage = await fetch(`${doubanLink}/awards/`, {
284 | responseType: 'text',
285 | });
286 | const awardsDoc = new DOMParser().parseFromString(awardsPage, 'text/html');
287 | const awards = $('#content > div > div.article', awardsDoc).html()
288 | .replace(/[ \n]/g, '')
289 | .replace(/<\/li>
/g, ' ')
290 | .replace(/<\/a> ]*>/g, '\n')
292 | .replace(/<[^>]+>/g, '')
293 | .replace(/ /g, ' ')
294 | .replace(/ +\n/g, '\n')
295 | .trim();
296 | return awards?.replace(/\n/g, '
') ?? '';
297 | };
298 | const formatDoubanInfo = async (domString) => {
299 | const dom = new DOMParser().parseFromString(domString, 'text/html');
300 | const chineseTitle = $('title', dom).text().replace('(豆瓣)', '').trim();
301 | const jsonData = JSON.parse($('head > script[type="application/ld+json"]', dom).html().replace(/(\r\n|\n|\r|\t)/gm, ''));
302 | const fetchAnchor = function (anchor) {
303 | return anchor?.[0]?.nextSibling?.nodeValue?.trim() ?? '';
304 | };
305 | const rating = jsonData.aggregateRating ? jsonData.aggregateRating.ratingValue : 0;
306 | const votes = jsonData.aggregateRating ? jsonData.aggregateRating.ratingCount : 0;
307 | const director = jsonData.director ? jsonData.director : [];
308 | const poster = jsonData.image
309 | .replace(/s(_ratio_poster|pic)/g, 'l$1')
310 | .replace(/img\d/, 'img9');
311 | const link = `https://movie.douban.com${jsonData.url}`;
312 | const introductionDom = $('#link-report > span.all.hidden,#link-report-intra > [property="v:summary"], #link-report > [property="v:summary"]', dom);
313 | const summary = (
314 | introductionDom.length > 0 ? introductionDom.text() : '暂无相关剧情介绍'
315 | ).split('\n').map(a => a.trim()).filter(a => a.length > 0).join('\n'); // 处理简介缩进
316 | const genre = $('#info span[property="v:genre"]', dom).map(function () { // 类别
317 | return $(this).text().trim();
318 | }).toArray(); // 类别
319 | const language = fetchAnchor($('#info span.pl:contains("语言")', dom));
320 | const region = fetchAnchor($('#info span.pl:contains("制片国家/地区")', dom)); // 产地
321 | const runtimeAnchor = $('#info span.pl:contains("单集片长")', dom);
322 | const runtime = runtimeAnchor[0] ? fetchAnchor(runtimeAnchor) : $('#info span[property="v:runtime"]', dom).text().trim();
323 | const akaAnchor = $('#info span.pl:contains("又名")', dom);
324 | let aka = [];
325 | if (akaAnchor.length > 0) {
326 | aka = fetchAnchor(akaAnchor).split(' / ').sort(function (a, b) { // 首字(母)排序
327 | return a.localeCompare(b);
328 | }).join('/');
329 | aka = aka.split('/');
330 | }
331 | const awards = await getAwardInfo(link);
332 | return {
333 | director: director.map(item => item.name),
334 | runtime,
335 | language,
336 | genre: genre?.join(' / ') ?? '',
337 | aka: aka?.join(' / ') ?? '',
338 | region,
339 | link,
340 | poster,
341 | summary,
342 | chineseTitle,
343 | votes,
344 | average: rating,
345 | awards,
346 | };
347 | };
348 | const getTorrentTitle = () => {
349 | let { titleDom } = CURRENT_SITE_INFO;
350 | if (!titleDom) {
351 | if (CURRENT_SITE_NAME === 'BHD') {
352 | titleDom = $('.dotborder').find('td:contains(Name)').next('td');
353 | } else if (CURRENT_SITE_NAME.match(/ACM|BLU/)) {
354 | const keyMap = {
355 | Name: 'Name',
356 | 名称: 'Name',
357 | 名稱: 'Name',
358 | };
359 | $('#vue+.panel table tr').each((index, element) => {
360 | const key = $(element).find('td:first').text().replace(/\s|\n/g, '');
361 | if (keyMap[key]) {
362 | titleDom = $(element).find('td:last');
363 | }
364 | });
365 | } else if (CURRENT_SITE_NAME === 'UHD') {
366 | const torrentId = getUrlParam('torrentid');
367 | const torrentFilePathDom = $(`#files_${torrentId} .filelist_path`);
368 | const torrentFileDom = $(`#files_${torrentId} .filelist_table>tbody>tr:nth-child(2) td`).eq(0);
369 | titleDom = torrentFilePathDom || torrentFileDom;
370 | } else if (CURRENT_SITE_NAME === 'HDT') {
371 | return document.title.replace(/HD-Torrents.org\s*-/ig, '').trim();
372 | }
373 | }
374 | return $(titleDom).text();
375 | };
376 | const getUrlParam = (key) => {
377 | const reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)');
378 | const regArray = location.search.substr(1).match(reg);
379 | if (regArray) {
380 | return unescape(regArray[2]);
381 | }
382 | return '';
383 | };
384 | const createDoubanDom = async (doubanId, imdbId, doubanInfo) => {
385 | const div = document.createElement('div');
386 | let { doubanContainerDom, insertDomSelector, siteName, poster } = CURRENT_SITE_INFO;
387 | if (siteName.match(/(HDT)$/)) {
388 | insertDomSelector = $(insertDomSelector).parent();
389 | }
390 | $(insertDomSelector).before(doubanContainerDom);
391 | const doubanLink = `https://movie.douban.com/subject/${doubanId}`;
392 |
393 | let htmlData = await fetch(`${doubanLink}/output_card`, {
394 | responseType: 'text',
395 | });
396 | htmlData = htmlData.replace(/wrapper/g, 'douban-wrapper').replace(//g, '');
397 | htmlData = htmlData.replace(/(html,)body,/, '$1');// HDB body样式覆盖
398 | htmlData = htmlData.replace(/url\(.+?output_card\/border.png\)/g, `url(${PIC_URLS.border})`);
399 | htmlData = htmlData.replace(/src=.+?output_card\/line\.png/g, `src="${PIC_URLS.line}`);
400 | let headDom = htmlData.match(/((.|\n)+)<\/head>/)[1];
401 | headDom = headDom.replace(//g, '');
402 | const bodyDom = htmlData.match(/((.|\n)+)<\/body>/)[1];
403 | div.insertAdjacentHTML('beforeend', headDom);
404 | div.insertAdjacentHTML('beforeend', bodyDom);
405 | $('.douban-dom').append(div).attr('douban-link', doubanLink);
406 | $('.douban-dom .grid-col4').after(`
407 |
408 |
409 |

410 |
411 |
412 | `);
413 | const doubanData = doubanInfo || await getDoubanInfo(doubanId, imdbId);
414 | $('.douban-dom .grid-col5').html(`${doubanData.summary || '暂无简介'}
`);
415 | let posterStyle = $('.picture-douban-wrapper').attr('style');
416 | const posterImg = siteName === 'MTV' ? $(poster).attr('src') : doubanData.poster;
417 | posterStyle = posterStyle?.replace(/\(.+\)/, `(${posterImg})`);
418 | $('.picture-douban-wrapper').attr('style', posterStyle);
419 | $('.douban-dom').click(() => {
420 | GM_openInTab(doubanLink);
421 | });
422 | };
423 | function fetch (url, options = {}) {
424 | return new Promise((resolve, reject) => {
425 | GM_xmlhttpRequest({
426 | method: 'GET',
427 | url,
428 | responseType: 'json',
429 | ...options,
430 | onload: (res) => {
431 | const { statusText, status, response } = res;
432 | if (status !== 200) {
433 | reject(new Error(statusText || status));
434 | } else {
435 | resolve(response);
436 | }
437 | },
438 | ontimeout: () => {
439 | reject(new Error('timeout'));
440 | },
441 | onerror: (error) => {
442 | reject(error);
443 | },
444 | });
445 | });
446 | }
447 | export {
448 | isChinese,
449 | getImdbId,
450 | getDoubanInfo,
451 | addToPtpPage,
452 | addToANTPage,
453 | getDoubanId,
454 | createDoubanDom,
455 | getTvSeasonData,
456 | getDoubanIdByIMDB,
457 | getDoubanInfoByIMDB,
458 | };
459 |
--------------------------------------------------------------------------------
/src/config/aither.cc.yaml:
--------------------------------------------------------------------------------
1 | url: https://aither.cc
2 | host: aither.cc
3 | siteName: Aither
4 | poster: '#meta-poster'
5 | imdb: '.badge-user a[href*="imdb.com/title"]:nth-child(1)'
6 | insertDomSelector: '.torrent-buttons'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/anthelion.me.yaml:
--------------------------------------------------------------------------------
1 | url: https://anthelion.me
2 | host: anthelion.me
3 | siteName: ANT
4 | siteType: gazelle
5 | imdb:
6 | request: '.layout a[href*="imdb.com/title"]:first'
7 | torrent: '.torrent_ratings a[href*="imdb.com/title"]:first'
--------------------------------------------------------------------------------
/src/config/asiancinema.me.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://asiancinema.me'
2 | host: asiancinema.me
3 | siteName: ACM
4 | poster: 'img.movie-poster'
5 | imdb: '.badge-user a[href*="imdb.com/title"]:nth-child(1)'
6 | insertDomSelector: '#vue'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/avistaz.to.yaml:
--------------------------------------------------------------------------------
1 | url: https://avistaz.to
2 | host: avistaz.to
3 | siteName: AvistaZ
4 | imdb: '.movie-details .badge-extra a[href*="imdb.com/title"]:first'
5 | titleDom: '.title .torrent-filename'
6 | poster: '.movie-poster img'
7 | insertDomSelector: '.movie-poster'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/baconbits.org.yaml:
--------------------------------------------------------------------------------
1 | url: https://baconbits.org
2 | host: baconbits.org
3 | siteName: bB
4 | imdb: '.box .body a[href*="imdb.com/title"]:first'
5 | insertDomSelector: '.linkbox:first'
6 | titleDom: h1:first
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/beyond-hd.me.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://beyond-hd.me'
2 | host: beyond-hd.me
3 | siteName: BHD
4 | imdb: '.movie-details a[href*="imdb.com/title"]:nth-child(1)'
5 | insertDomSelector: '.movie-wrapper'
6 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/blutopia.xyz.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://blutopia.xyz'
2 | host: blutopia.xyz
3 | siteName: BLU
4 | poster: '#meta-poster'
5 | imdb: '.badge-user a[href*="imdb.com/title"]:nth-child(1)'
6 | insertDomSelector: '.torrent-buttons'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/broadcasthe.net.yaml:
--------------------------------------------------------------------------------
1 | url: https://broadcasthe.net
2 | host: broadcasthe.net
3 | siteName: BTN
4 | imdb: '.stats td a[href*="imdb.com/title"]'
5 | insertDomSelector: '#content .linkbox'
6 | poster: '.sidebar .box img:first'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/broadcity.in.yaml:
--------------------------------------------------------------------------------
1 | url: https://broadcity.in
2 | host: broadcity.in
3 | siteName: Bdc
4 | imdb: '#imdbdetails a[href*="imdb.com/title"]'
5 | titleDom: '#details>table>tbody>tr:first'
6 | insertDomSelector: '#imdbdetails'
7 | poster: '#ts_show_preview img'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/filelist.io.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://filelist.io'
2 | host: filelist.io
3 | siteName: FL
4 | imdb: '.cblock-innercontent div a[href*="imdb.com/title"]:first'
5 | poster: 'img[width="300px"][src*="image.tmdb.org"]'
6 | titleDom: '.cblock-header h4'
7 | insertDomSelector: '.cblock-innercontent hr.separator:first'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/hd-torrents.org.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://hd-torrents.org'
2 | host: hd-torrents.org
3 | siteName: HDT
4 | poster: '#IMDBDetailsInfoHideShowTR .imdbnew a img'
5 | imdb: '.imdbnew2 a[href*="imdb.com/title"]:first'
6 | insertDomSelector: 'td.detailsleft:contains(IMDb)'
7 | doubanContainerDom: '豆瓣 | |
'
--------------------------------------------------------------------------------
/src/config/hdbits.org.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://hdbits.org'
2 | host: hdbits.org
3 | siteName: HDB
4 | imdb:
5 | movie: '.contentlayout h1 a'
6 | tv: '#details .showlinks li:nth-child(2) a'
7 | tvRequest: '.lottery_table2 .showlinks li:nth-child(2) a'
8 | titleDom: h1:first
9 | insertDomSelector: '#details>tbody>tr:nth-child(2),.lottery_table2>tbody>tr:nth-child(1)'
10 | doubanContainerDom: '- 豆瓣信息 |
'
--------------------------------------------------------------------------------
/src/config/iptorrents.com.yaml:
--------------------------------------------------------------------------------
1 | url: https://iptorrents.com
2 | host: iptorrents.com
3 | siteName: IPT
4 | imdb: '.main td a[href*="imdb.com/title"]'
5 | titleDom: '.dBox h1'
6 | insertDomSelector: '.dBox .info'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/karagarga.in.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://karagarga.in'
2 | host: karagarga.in
3 | siteName: KG
4 | imdb: 'td a[href*="imdb.com/title"]:first'
5 | insertDomSelector: '.outer h1~table:first'
6 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/passthepopcorn.me.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://passthepopcorn.me'
2 | host: passthepopcorn.me
3 | siteName: PTP
4 | siteType: gazelle
5 | imdb:
6 | request: '#request-table a[href*="imdb.com/title"]:first'
7 | torrent: '#imdb-title-link'
--------------------------------------------------------------------------------
/src/config/privatehd.to.yaml:
--------------------------------------------------------------------------------
1 | url: https://privatehd.to
2 | host: privatehd.to
3 | siteName: PHD
4 | imdb: '.movie-details .badge-extra a[href*="imdb.com/title"]:first'
5 | titleDom: '.title .torrent-filename'
6 | poster: '.movie-poster img'
7 | insertDomSelector: '.movie-poster'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/secret-cinema.pw.yaml:
--------------------------------------------------------------------------------
1 | url: https://secret-cinema.pw
2 | host: secret-cinema.pw
3 | siteName: SC
4 | imdb: '.torrent_row a[href*="imdb.com/title"]:first'
5 | insertDomSelector: '.linkbox:first'
6 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/shadowthein.net.yaml:
--------------------------------------------------------------------------------
1 | url: http://shadowthein.net
2 | host: shadowthein.net
3 | siteName: iTS
4 | imdb: '.IMDBtable a[href*="imdb.com/title"]:first'
5 | insertDomSelector: 'h1+table.line'
6 | titleDom: h1:first
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/tgx.rs.yaml:
--------------------------------------------------------------------------------
1 | url: https://tgx.rs
2 | host: tgx.rs
3 | siteName: TorrentGalaxy
4 | poster: '#covercell img'
5 | imdb: '#imdbpage[href*="imdb.com/title"]'
6 | titleDom: '.torrentpagetable.limitwidth:first a.textshadow'
7 | insertDomSelector: '.buttonbox'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/uhdbits.org.yaml:
--------------------------------------------------------------------------------
1 | url: 'https://uhdbits.org'
2 | host: uhdbits.org
3 | siteName: UHD
4 | imdb: '.tooltip.imdb_icon'
5 | poster: '.poster_box .imgbox img'
6 | insertDomSelector: 'div.head:contains(IMDB)'
7 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/www.morethantv.me.yaml:
--------------------------------------------------------------------------------
1 | url: www.morethantv.me
2 | host: morethantv.me
3 | siteName: MTV
4 | imdb: '.metalinks a[href*="imdb.com/title"]'
5 | insertDomSelector: '#content>.thin>div:first'
6 | poster: '.sidebar img:first'
7 | titleDom: '.details h2:first'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/config/www.torrentleech.org.yaml:
--------------------------------------------------------------------------------
1 | url: https://www.torrentleech.org
2 | host: torrentleech.org
3 | siteName: IPT
4 | imdb: '.imdb-info a[href*="imdb.com/title"]'
5 | titleDom: '#torrentnameid'
6 | poster: '.imdb_cover img'
7 | insertDomSelector: '.torrent-info .torrent-info-details'
8 | doubanContainerDom: ''
--------------------------------------------------------------------------------
/src/const.js:
--------------------------------------------------------------------------------
1 | import { PT_SITE } from './config.json';
2 |
3 | const host = location.host;
4 | let siteInfo = PT_SITE?.[host] ?? '';
5 | if (host && host.match(/iptorrents/i)) {
6 | siteInfo = PT_SITE['iptorrents.com'];
7 | } else {
8 | siteInfo = PT_SITE?.[host] ?? '';
9 | }
10 | const CURRENT_SITE_INFO = siteInfo;
11 | const CURRENT_SITE_NAME = CURRENT_SITE_INFO?.siteName ?? '';
12 | const DOUBAN_SUBJECT_URL = 'https://movie.douban.com/subject/{doubanId}';
13 | const DOUBAN_SEARCH_API = 'https://movie.douban.com/j/subject_suggest?q={query}';
14 | const DOUBAN_SUGGEST_API = 'https://www.douban.com/search?cat=1002&q={query}';
15 | const DOUBAN_API_URL = 'https://api.douban.com/v2/movie';
16 | const PIC_URLS = {
17 | border: 'https://ptpimg.me/zz4632.png',
18 | icon2x: 'https://ptpimg.me/n74cjc.png',
19 | icon: 'https://ptpimg.me/yze1gz.png',
20 | line: 'https://ptpimg.me/e11hb1.png',
21 | };
22 | export {
23 | CURRENT_SITE_INFO,
24 | CURRENT_SITE_NAME,
25 | DOUBAN_API_URL,
26 | DOUBAN_SEARCH_API,
27 | PIC_URLS,
28 | DOUBAN_SUGGEST_API,
29 | DOUBAN_SUBJECT_URL,
30 | };
31 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import {
2 | CURRENT_SITE_INFO, CURRENT_SITE_NAME,
3 | } from './const';
4 | import {
5 | getImdbId, getTvSeasonData, createDoubanDom,
6 | addToPtpPage, getDoubanInfoByIMDB, addToANTPage,
7 | } from './common';
8 | import './style.js';
9 | (async () => {
10 | if (CURRENT_SITE_INFO) {
11 | const imdbId = getImdbId();
12 | if (!imdbId) {
13 | return;
14 | }
15 | try {
16 | const savedIds = GM_getValue('ids') || {};
17 | if (!savedIds[imdbId] ||
18 | (savedIds[imdbId] && savedIds[imdbId].updateTime && Date.now() - savedIds[imdbId].updateTime >= 30 * 24 * 60 * 60 * 1000)) {
19 | let doubanId = '';
20 | const movieData = await getDoubanInfoByIMDB(imdbId);
21 | if (!movieData) {
22 | throw new Error('没有找到豆瓣条目');
23 | }
24 | const { id = '', episodes = '' } = movieData;
25 | doubanId = id;
26 | if (episodes) {
27 | const tvData = await getTvSeasonData(movieData);
28 | doubanId = tvData.id;
29 | }
30 | if (CURRENT_SITE_NAME.match(/PTP/)) {
31 | addToPtpPage(movieData);
32 | } else if (CURRENT_SITE_NAME.match(/ANT/)) {
33 | addToANTPage(movieData);
34 | } else {
35 | createDoubanDom(doubanId, imdbId);
36 | }
37 | } else {
38 | const savedData = savedIds[imdbId];
39 | if (CURRENT_SITE_NAME.match(/PTP/)) {
40 | addToPtpPage(savedData);
41 | } else if (CURRENT_SITE_NAME.match(/ANT/)) {
42 | addToANTPage(savedData);
43 | } else {
44 | createDoubanDom(savedData.doubanId, imdbId, savedData);
45 | }
46 | }
47 | } catch (error) {
48 | console.log(error);
49 | }
50 | }
51 | })();
52 |
--------------------------------------------------------------------------------
/src/style.js:
--------------------------------------------------------------------------------
1 | export default GM_addStyle(`
2 | .bigstar50,.bigstar45,.bigstar40,.bigstar35,.bigstar30,.bigstar25,.bigstar20,.bigstar15,.bigstar10,.bigstar05,.bigstar00 {
3 | display: inline-block;
4 | *display: inline;
5 | zoom:1;background: https://ptpimg.me/yze1gz.png) no-repeat;
6 | background: -webkit-image-set(https://ptpimg.me/yze1gz.png) 1x, url(https://ptpimg.me/n74cjc.png) 2x) no-repeat;
7 | background: -moz-image-set(https://ptpimg.me/yze1gz.png) 1x, url(https://ptpimg.me/n74cjc.png) 2x) no-repeat;
8 | background: -o-image-set(https://ptpimg.me/yze1gz.png) 1x, url(https://ptpimg.me/n74cjc.png) 2x) no-repeat;
9 | background: -ms-image-set(https://ptpimg.me/yze1gz.png) 1x, url(https://ptpimg.me/n74cjc.png) 2x) no-repeat;
10 | width: 75px;
11 | height: 15px;
12 | margin: 1px 0 0 0;
13 | overflow: hidden
14 | }
15 |
16 | .bigstar50+span.rating_num,.bigstar45+span.rating_num,.bigstar40+span.rating_num,.bigstar35+span.rating_num,.bigstar30+span.rating_num,.bigstar25+span.rating_num,.bigstar20+span.rating_num,.bigstar15+span.rating_num,.bigstar10+span.rating_num,.bigstar05+span.rating_num,.bigstar00+span.rating_num {
17 | font-size: 16px;
18 | line-height: 1
19 | }
20 |
21 | .bigstar50 {
22 | background-position: 0 0px
23 | }
24 |
25 | .bigstar45 {
26 | background-position: 0 -15px
27 | }
28 |
29 | .bigstar40 {
30 | background-position: 0 -30px
31 | }
32 |
33 | .bigstar35 {
34 | background-position: 0 -45px
35 | }
36 |
37 | .bigstar30 {
38 | background-position: 0 -60px
39 | }
40 |
41 | .bigstar25 {
42 | background-position: 0 -75px
43 | }
44 |
45 | .bigstar20 {
46 | background-position: 0 -90px
47 | }
48 |
49 | .bigstar15 {
50 | background-position: 0 -105px
51 | }
52 |
53 | .bigstar10 {
54 | background-position: 0 -120px
55 | }
56 |
57 | .bigstar05 {
58 | background-position: 0 -135px
59 | }
60 |
61 | .bigstar00 {
62 | background-position: 0 -150px
63 | }
64 |
65 | .allstar50,.allstar45,.allstar40,.allstar35,.allstar30,.allstar25,.allstar20,.allstar15,.allstar10,.allstar05,.allstar00,.rating1-t,.rating15-t,.rating2-t,.rating25-t,.rating3-t,.rating35-t,.rating4-t,.rating45-t,.rating5-t,.rating-t,.starb~.stars5,.starb~.stars4,.starb~.stars3,.starb~.stars2,.starb~.stars1,.collectors .stars5,.collectors .stars4,.collectors .stars3,.collectors .stars2,.collectors .stars1 {
66 | display: inline-block;
67 | *display: inline;
68 | zoom:1;background: url(/f/movie/b8f4c3672ef81106701071831e22422a745d3b74/pics/rating_icons/ic_rating_s.png) no-repeat;
69 | background: -webkit-image-set(url(/f/movie/b8f4c3672ef81106701071831e22422a745d3b74/pics/rating_icons/ic_rating_s.png) 1x, url(/f/movie/076dc86067c402ced53eee7c09cd45402235733c/pics/rating_icons/ic_rating_s@2x.png) 2x) no-repeat;
70 | background: -moz-image-set(url(/f/movie/b8f4c3672ef81106701071831e22422a745d3b74/pics/rating_icons/ic_rating_s.png) 1x, url(/f/movie/076dc86067c402ced53eee7c09cd45402235733c/pics/rating_icons/ic_rating_s@2x.png) 2x) no-repeat;
71 | background: -o-image-set(url(/f/movie/b8f4c3672ef81106701071831e22422a745d3b74/pics/rating_icons/ic_rating_s.png) 1x, url(/f/movie/076dc86067c402ced53eee7c09cd45402235733c/pics/rating_icons/ic_rating_s@2x.png) 2x) no-repeat;
72 | background: -ms-image-set(url(/f/movie/b8f4c3672ef81106701071831e22422a745d3b74/pics/rating_icons/ic_rating_s.png) 1x, url(/f/movie/076dc86067c402ced53eee7c09cd45402235733c/pics/rating_icons/ic_rating_s@2x.png) 2x) no-repeat;
73 | width: 55px;
74 | height: 11px;
75 | margin: 0 3px 0 0;
76 | overflow: hidden
77 | }
78 |
79 | .status-item .allstar50,.status-item .allstar45,.status-item .allstar40,.status-item .allstar35,.status-item .allstar30,.status-item .allstar25,.status-item .allstar20,.status-item .allstar15,.status-item .allstar10,.status-item .allstar05,.status-item .allstar00,.status-item .rating1-t,.status-item .rating15-t,.status-item .rating2-t,.status-item .rating25-t,.status-item .rating3-t,.status-item .rating35-t,.status-item .rating4-t,.status-item .rating45-t,.status-item .rating5-t,.status-item .rating-t,.status-item .starb~.stars5,.status-item .starb~.stars4,.status-item .starb~.stars3,.status-item .starb~.stars2,.status-item .starb~.stars1,.status-item .collectors .stars5,.status-item .collectors .stars4,.status-item .collectors .stars3,.status-item .collectors .stars2,.status-item .collectors .stars1 {
80 | margin: 0 0 0 4px
81 | }
82 |
83 | .allstar50 {
84 | background-position: 0 0px
85 | }
86 |
87 | .allstar45 {
88 | background-position: 0 -11px
89 | }
90 |
91 | .allstar40 {
92 | background-position: 0 -22px
93 | }
94 |
95 | .allstar35 {
96 | background-position: 0 -33px
97 | }
98 |
99 | .allstar30 {
100 | background-position: 0 -44px
101 | }
102 |
103 | .allstar25 {
104 | background-position: 0 -55px
105 | }
106 |
107 | .allstar20 {
108 | background-position: 0 -66px
109 | }
110 |
111 | .allstar15 {
112 | background-position: 0 -77px
113 | }
114 |
115 | .allstar10 {
116 | background-position: 0 -88px
117 | }
118 |
119 | .allstar05 {
120 | background-position: 0 -99px
121 | }
122 |
123 | .allstar00 {
124 | background-position: 0 -110px
125 | }
126 |
127 | .rating5-t,.starb~.stars5,.collectors .stars5 {
128 | background-position: 0 0px
129 | }
130 |
131 | .rating45-t {
132 | background-position: 0 -11px
133 | }
134 |
135 | .rating4-t,.starb~.stars4,.collectors .stars4 {
136 | background-position: 0 -22px
137 | }
138 |
139 | .rating35-t {
140 | background-position: 0 -33px
141 | }
142 |
143 | .rating3-t,.starb~.stars3,.collectors .stars3 {
144 | background-position: 0 -44px
145 | }
146 |
147 | .rating25-t {
148 | background-position: 0 -55px
149 | }
150 |
151 | .rating2-t,.starb~.stars2,.collectors .stars2 {
152 | background-position: 0 -66px
153 | }
154 |
155 | .rating15-t {
156 | background-position: 0 -77px
157 | }
158 |
159 | .rating1-t,.starb~.stars1,.collectors .stars1 {
160 | background-position: 0 -88px
161 | }
162 |
163 | .rating1-t,.rating15-t,.rating2-t,.rating25-t,.rating3-t,.rating35-t,.rating4-t,.rating45-t,.rating5-t,.rating-t {
164 | padding-left: 5px
165 | }
166 |
167 | #stars {
168 | font-size: 0;
169 | vertical-align: text-bottom;
170 | cursor: pointer
171 | }
172 |
173 | #stars a img {
174 | vertical-align: text-bottom
175 | }
176 |
177 | .starstop,.stars {
178 | margin-right: 5px
179 | }
180 |
181 | .starstop {
182 | float: left
183 | }
184 |
185 | .rating_nums,.rating_num {
186 | color: #e09015;
187 | font-size: 12px;
188 | padding: 0 3px
189 | }
190 |
191 | .status-item .rating_num {
192 | font-size: 14px
193 | }
194 |
195 | .rating_nums {
196 | padding-left: 0
197 | }
198 |
199 | .star .rating_num {
200 | color: #e09015;
201 | padding: 0 5px 0 0
202 | }
203 |
204 | #interest_sect {
205 | overflow: hidden;
206 | word-wrap: break-word
207 | }
208 |
209 | #interest_sectl {
210 | float: left;
211 | width: 155px;
212 | margin: 2px 0 0 0;
213 | padding: 0 0 0 15px;
214 | border-left: 1px solid #eaeaea;
215 | color: #9b9b9b
216 | }
217 |
218 | #interest_sectl .rating_wrap {
219 | padding-bottom: 15px;
220 | font-size: 12px;
221 | line-height: 14px
222 | }
223 |
224 | #interest_sectl .rating_wrap .rating_logo {
225 | line-height: 1
226 | }
227 |
228 | #interest_sectl .rating_self {
229 | padding: 0;
230 | line-height: 2
231 | }
232 |
233 | #interest_sectl .rating_self:before,#interest_sectl .rating_self:after {
234 | content: '';
235 | display: block;
236 | clear: both
237 | }
238 |
239 | #interest_sectl .rating_self .rating_sum {
240 | clear: both
241 | }
242 |
243 | #interest_sectl .rating_num {
244 | color: #494949;
245 | padding: 0;
246 | min-width: 30%;
247 | font-size: 28px
248 | }
249 |
250 | #interest_sectl .rating_right {
251 | float: left;
252 | padding: 10px 0 10px 6px
253 | }
254 |
255 | #interest_sectl .rating_right.not_showed {
256 | padding: 10px 0
257 | }
258 |
259 | #interest_sectl .power {
260 | height: 10px;
261 | float: left;
262 | margin: 1px 4px;
263 | background: #ffd596 none repeat scroll 0 0
264 | }
265 |
266 | #interest_sectl .power.color_gray {
267 | background: #ccc
268 | }
269 |
270 | #interest_sectl .rating_per {
271 | font-size: 11px
272 | }
273 |
274 | #interest_sectl .rating_betterthan {
275 | position: relative;
276 | padding: 15px 0;
277 | border-top: 1px solid #eaeaea;
278 | color: #9b9b9b;
279 | margin: 0
280 | }
281 |
282 | .rating_logo_wrap .content {
283 | display: inline-block;
284 | *display: inline;
285 | zoom:1;vertical-align: top;
286 | font-size: 12px;
287 | line-height: 20px;
288 | color: #9b9b9b;
289 | margin-right: 4px
290 | }
291 |
292 | .rating_helper_wrap {
293 | display: inline-block;
294 | *display: inline;
295 | zoom:1;vertical-align: top;
296 | position: relative;
297 | line-height: 18px
298 | }
299 |
300 | .rating_helper_wrap:hover .rating_helper_icon {
301 | background-position: 0 -12px
302 | }
303 |
304 | .rating_helper_wrap:hover .rating_helper_content {
305 | display: block
306 | }
307 |
308 | .rating_helper_icon {
309 | background: url(/f/movie/16305b59f6b69b8acde51c880de2a5b6cde0155a/pics/icon/ic_qmark.png) no-repeat;
310 | background: -webkit-image-set(url(/f/movie/16305b59f6b69b8acde51c880de2a5b6cde0155a/pics/icon/ic_qmark.png) 1x, url(/f/movie/1fb4f85391f82c3286d7318d840577daae1c2eee/pics/icon/ic_qmark@2x.png) 2x) no-repeat;
311 | background: -moz-image-set(url(/f/movie/16305b59f6b69b8acde51c880de2a5b6cde0155a/pics/icon/ic_qmark.png) 1x, url(/f/movie/1fb4f85391f82c3286d7318d840577daae1c2eee/pics/icon/ic_qmark@2x.png) 2x) no-repeat;
312 | background: -o-image-set(url(/f/movie/16305b59f6b69b8acde51c880de2a5b6cde0155a/pics/icon/ic_qmark.png) 1x, url(/f/movie/1fb4f85391f82c3286d7318d840577daae1c2eee/pics/icon/ic_qmark@2x.png) 2x) no-repeat;
313 | background: -ms-image-set(url(/f/movie/16305b59f6b69b8acde51c880de2a5b6cde0155a/pics/icon/ic_qmark.png) 1x, url(/f/movie/1fb4f85391f82c3286d7318d840577daae1c2eee/pics/icon/ic_qmark@2x.png) 2x) no-repeat;
314 | display: inline-block;
315 | *display: inline;
316 | zoom:1;vertical-align: middle;
317 | width: 12px;
318 | height: 12px
319 | }
320 |
321 | .rating_helper_content {
322 | z-index: 10;
323 | color: #494949;
324 | display: none;
325 | position: absolute;
326 | left: 12px;
327 | bottom: 3px;
328 | width: 96px;
329 | background: #fef6e9;
330 | border: 1px solid #e3d9ca;
331 | padding: 8px 10px;
332 | border-radius: 4px;
333 | box-shadow: 0 2px 5px rgba(0,0,0,0.1)
334 | }
335 |
336 | .rating_content_wrap {
337 | width: 110%;
338 | padding-bottom: 8px
339 | }
340 |
341 | .rating_content_wrap .rating_avg {
342 | float: left;
343 | font-size: 16px;
344 | line-height: 28px;
345 | color: #494949;
346 | margin-right: 12px
347 | }
348 |
349 | .rating_content_wrap .friends {
350 | float: left;
351 | margin-right: 6px
352 | }
353 |
354 | .rating_content_wrap .avatar {
355 | float: left;
356 | margin-top: 6px;
357 | margin-right: 2px;
358 | line-height: 0;
359 | border-radius: 50%;
360 | overflow: hidden;
361 | cursor: default
362 | }
363 |
364 | .rating_content_wrap .avatar img {
365 | width: 16px
366 | }
367 |
368 | .rating_content_wrap .friends_count {
369 | float: left;
370 | line-height: 14px;
371 | margin-top: 7px
372 | }
373 |
374 | #screening .subject-rate {
375 | color: #e09015;
376 | font-size: 12px;
377 | margin-left: 2px
378 | }
379 |
380 | #screening .rating {
381 | display: inline-block;
382 | *display: inline;
383 | zoom:1;margin: 4px auto 2px;
384 | height: 19px
385 | }
386 |
387 | #screening .rating span {
388 | float: left
389 | }
390 |
391 | #screening .rating .rating-star {
392 | margin: 3px 3px 0 0;
393 | width: 55px
394 | }
395 |
396 | span.subject-rate,.rate,.subject-rating {
397 | color: #e09015
398 | }
399 |
400 | img.rating {
401 | vertical-align: text-bottom
402 | }
403 |
404 | img.rating:nth-child(1) {
405 | padding-left: 10px
406 | }
407 |
408 | .rec-list .score {
409 | color: #e09015
410 | }
411 |
412 | .album-item .star {
413 | line-height: 1;
414 | margin-top: 6px
415 | }
416 |
417 | .album-item .star .allstar50,.album-item .star .allstar45,.album-item .star .allstar40,.album-item .star .allstar35,.album-item .star .allstar30,.album-item .star .allstar25,.album-item .star .allstar20,.album-item .star .allstar15,.album-item .star .allstar10,.album-item .star .allstar05,.album-item .star .allstar00 {
418 | float: left
419 | }
420 |
421 | .album-item .star .score {
422 | color: #e09015
423 | }
424 |
425 | .game-ratings strong {
426 | margin: 0 6px;
427 | color: #e09015
428 | }
429 |
430 | .link-subject .rate-more span {
431 | font-size: 10px;
432 | color: #e09015
433 | }
434 |
435 | .rating-controversy-reason {
436 | background-color: #FFFBF4;
437 | color: #494949;
438 | line-height: 14px;
439 | margin: 15px 0px 0px 0px;
440 | padding: 6px 20px 6px 35px;
441 | font-size: 11px;
442 | position: relative
443 | }
444 |
445 | .rating-controversy-reason:before {
446 | content: '';
447 | display: block;
448 | width: 14px;
449 | height: 14px;
450 | position: absolute;
451 | left: 12px;
452 | top: 50%;
453 | transform: translateY(-50%);
454 | background-image: url("data:image/svg+xml, %3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8%200a8%208%200%20110%2016A8%208%200%20018%200zm0%2010.667a1%201%200%20100%202%201%201%200%20000-2zm0-8a1.207%201.207%200%2000-1.2%201.326l.467%204.677a.737.737%200%20001.466%200l.468-4.677A1.207%201.207%200%20008%202.667z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");
455 | background-size: contain
456 | }
457 |
458 | body #douban-wrapper {
459 | width: 770px;
460 | height: 345px;
461 | margin: 0;
462 | font: 12px Helvetica,Arial,sans-serif
463 | }
464 |
465 | #douban-wrapper .ll {
466 | float: left
467 | }
468 |
469 | #douban-wrapper .col-container .fix-col {
470 | float: left
471 | }
472 |
473 | #douban-wrapper #content {
474 | background-repeat: no-repeat;
475 | padding: 10px;
476 | width: 750px;
477 | height: 325px;
478 | min-height: initial
479 | }
480 |
481 | #douban-wrapper #content h1 {
482 | font-size: 20px
483 | }
484 |
485 | #douban-wrapper #content .grid {
486 | width: 750px;
487 | height: 325px;
488 | border-radius: 9px
489 | }
490 |
491 | #douban-wrapper #content .grid .grid-col1 {
492 | width: 225px
493 | }
494 |
495 | #douban-wrapper #content .grid .grid-col2 {
496 | width: 254px;
497 | padding: 24px 18px;
498 | height: 277px;
499 | overflow: hidden
500 | }
501 |
502 | #douban-wrapper #content .grid .grid-col3 {
503 | width: 18px
504 | }
505 |
506 | #douban-wrapper #content .grid .grid-col4 {
507 | font-size: 14px;
508 | padding: 27px 14px 0 12px;
509 | width: 190px
510 | }
511 |
512 | #douban-wrapper #content .picture-douban-wrapper{
513 | width: 225px;
514 | height: 325px;
515 | border-top-left-radius: 9px;
516 | border-bottom-left-radius: 9px;
517 | background-size: cover;
518 | background-position: center
519 | }
520 |
521 | #douban-wrapper #content .main-title h1,#douban-wrapper #content .sub-title h2 {
522 | overflow: hidden;
523 | word-break: break-all;
524 | max-height: 2.5em;
525 | line-height: 1.2;
526 | display: -webkit-box;
527 | -webkit-line-clamp: 2;
528 | -webkit-box-orient: vertical
529 | }
530 |
531 | #douban-wrapper #content .main-title h1 {
532 | font-weight: 500;
533 | font-size: 30px;
534 | color: #000000
535 | }
536 |
537 | #douban-wrapper #content .sub-title {
538 | margin-top: 9px
539 | }
540 |
541 | #douban-wrapper #content .sub-title h2 {
542 | font-size: 18px;
543 | color: #ADADAD;
544 | font-weight: normal
545 | }
546 |
547 | #douban-wrapper #content .baseinfo {
548 | font-size: 16px;
549 | color: #000000;
550 | line-height: 25px;
551 | margin-top: 18px;
552 | letter-spacing: 1px;
553 | word-break: break-all;
554 | font-weight: 400;
555 | display: -webkit-box;
556 | overflow: hidden;
557 | -webkit-line-clamp: 5;
558 | -webkit-box-orient: vertical
559 | }
560 |
561 | #douban-wrapper #content .line-wrap {
562 | width: 18px;
563 | height: 100%;
564 | position: relative
565 | }
566 |
567 | #douban-wrapper #content .line-wrap img {
568 | width: 100%;
569 | height: 100%
570 | }
571 |
572 | #douban-wrapper #content .douban-icon {
573 | font-size: 0
574 | }
575 |
576 | #douban-wrapper #content .douban-icon>span {
577 | font-size: 14px;
578 | display: inline-block;
579 | text-align: center;
580 | border: 1px solid #41BE57
581 | }
582 |
583 | #douban-wrapper #content .douban-icon .icon-pt1 {
584 | background-color: #41BE57;
585 | color: white;
586 | border-top-left-radius: 4px;
587 | border-bottom-left-radius: 4px;
588 | width: 24px;
589 | height: 24px;
590 | line-height: 24px
591 | }
592 |
593 | #douban-wrapper #content .douban-icon .icon-pt2 {
594 | color: #3BA94D;
595 | background: #FFFFFF;
596 | border-top-right-radius: 4px;
597 | border-bottom-right-radius: 4px;
598 | width: 69px;
599 | height: 24px;
600 | line-height: 24px
601 | }
602 |
603 | #douban-wrapper #content .score-container .rating_self {
604 | margin-top: 15px
605 | }
606 |
607 | #douban-wrapper #content .score-container .rating_self .rating_num {
608 | font-size: 48px;
609 | line-height: 1;
610 | padding: 0;
611 | color: black;
612 | font-weight: normal
613 | }
614 |
615 | #douban-wrapper #content .score-container .rating_self .rating_right {
616 | float: left;
617 | padding-left: 10px;
618 | padding-top: 5px
619 | }
620 |
621 | #douban-wrapper #content .score-container .rating_self .rating_right .ll {
622 | float: none
623 | }
624 |
625 | #douban-wrapper #content .score-container .rating_self .rating_right .rating_sum {
626 | color: #3B3B3B
627 | }
628 |
629 | #douban-wrapper #content .score-container .rating_self .rating_right .rating_sum .rating_people,#douban-wrapper #content .score-container .rating_self .rating_right .rating_sum .rating_people:hover,#douban-wrapper #content .score-container .rating_self .rating_right .rating_sum .rating_people:visited,#douban-wrapper #content .score-container .rating_self .rating_right .rating_sum .rating_people:link {
630 | color: #3B3B3B;
631 | background: none
632 | }
633 |
634 | #douban-wrapper #content .score-container .ratings-on-weight {
635 | margin-top: 10px;
636 | min-weight: 1px
637 | }
638 |
639 | #douban-wrapper #content .score-container .ratings-on-weight .item {
640 | line-height: 1.5
641 | }
642 |
643 | #douban-wrapper #content .score-container .ratings-on-weight .item .starstop {
644 | float: none;
645 | margin-right: 0;
646 | color: #3B3B3B
647 | }
648 |
649 | #douban-wrapper #content .score-container .ratings-on-weight .item>span,#douban-wrapper #content .score-container .ratings-on-weight .item>div {
650 | display: inline-block
651 | }
652 |
653 | #douban-wrapper #content .score-container .ratings-on-weight .item .power {
654 | height: 6px;
655 | background: #FAA032;
656 | border-radius: 3px;
657 | vertical-align: middle
658 | }
659 |
660 | #douban-wrapper #content .bottom-row {
661 | display: flex;
662 | align-items: center;
663 | justify-content: space-between
664 | }
665 |
666 | #douban-wrapper #content .bottom-row .rating-betterthan {
667 | font-size: 14px;
668 | color: #1C1C1C;
669 | line-height: 21px;
670 | width: 117px
671 | }
672 |
673 | #douban-wrapper #content .bottom-row .rating-betterthan .number {
674 | font-size: 14px;
675 | color: #41BE57
676 | }
677 |
678 | #douban-wrapper #content .bottom-row .qr-code {
679 | width: 64px;
680 | height: 64px;
681 | overflow: hidden
682 | }
683 |
684 | #douban-wrapper #content .bottom-row .qr-code img {
685 | width: 100%;
686 | height: 100%
687 | }
688 |
689 | .contentlayout.douban-info {
690 | display: flex;
691 | justify-content: space-around;
692 | }
693 | .contentlayout.douban-info .detail{
694 | flex:1;
695 | }
696 | .detail .title{
697 | font-size: 26px;
698 | font-weight: 600;
699 | margin-bottom: 20px;
700 | }
701 | .detail .title a{
702 | text-decoration: none;
703 | }
704 | .movie-detail{
705 | display: flex;
706 | justify-content: space-between;
707 | }
708 | .movie-detail .synopsis {
709 | width: 60%;
710 | }
711 | .movie-detail .movieinfo {
712 | margin-right: 20px;
713 | max-width: 30%;
714 | }
715 | .icon-pt1{
716 | font-size: 14px;
717 | display: inline-block;
718 | text-align: center;
719 | border: 1px solid #41be57;
720 | background-color: #41be57;
721 | color: white;
722 | border-top-left-radius: 4px;
723 | border-bottom-left-radius: 4px;
724 | width: 24px;
725 | height: 24px;
726 | line-height: 24px;
727 | }
728 | .ant .icon-pt1{
729 | border-radius: 4px;
730 | }
731 |
732 | .icon-pt2{
733 | display: inline-block;
734 | text-align: center;
735 | border: 1px solid #41be57;
736 | color: #3ba94d;
737 | background: #ffffff;
738 | border-top-right-radius: 4px;
739 | border-bottom-right-radius: 4px;
740 | width: 69px;
741 | height: 24px;
742 | line-height: 24px;
743 | font-size: 14px;
744 | }
745 | .douban-dom {
746 | display: flex;
747 | cursor: pointer;
748 | }
749 | .douban-dom {
750 | text-align: left;
751 | }
752 | #douban-wrapper *{
753 | box-sizing: content-box;
754 | }
755 | #douban-wrapper .clearfix:after {
756 | content: ".";
757 | display: block;
758 | height: 0;
759 | clear: both;
760 | visibility: hidden
761 | }
762 | #douban-wrapper .clearfix {
763 | zoom: 1;
764 | display: inline-block;
765 | _height: 1px;
766 | }
767 | #douban-wrapper .clearfix {
768 | height: 1%
769 | }
770 | #douban-wrapper .clearfix {
771 | display: block
772 | }
773 | #douban-wrapper .rating_per{
774 | color: #111;
775 | }
776 | #douban-wrapper .grid{
777 | overflow: initial;
778 | }
779 | .content-rounded #douban-wrapper div{
780 | margin-left: 0;
781 | }
782 | #douban-wrapper #content .douban-icon .icon-pt1 {
783 | background-image:none;
784 | }
785 | #douban-wrapper h2,#douban-wrapper h1{
786 | border:none;
787 | background-image: none;
788 | background-color: transparent;
789 | text-shadow: none;
790 | padding: 0;
791 | margin: 0
792 | line-height: normal;
793 | }
794 | #douban-wrapper .grid-col5 {
795 | font-size: 14px;
796 | padding: 27px 14px 0 12px;
797 | width: 190px;
798 | overflow-y: auto;
799 | height: 277px;
800 | width: calc(100% - 225px - 254px - 36px - 280px);
801 | }
802 |
803 | #douban-wrapper .summary{
804 | padding-top: 10px;
805 | color: #000000;
806 | line-height: 25px;
807 | letter-spacing: 1px;
808 | word-break: break-all;
809 | font-weight: 400;
810 | }
811 | #douban-wrapper {
812 | width: 100% !important;
813 | }
814 | .douban-dom>div{
815 | width: 100%;
816 | }
817 | #douban-wrapper #content{
818 | background-image:none !important;
819 | background: #fff;
820 | width: calc(100% - 20px) !important;
821 | }
822 | #douban-wrapper #content .grid{
823 | width: 100% !important;
824 | }
825 | .bhd #douban-wrapper ::-webkit-scrollbar-track{
826 | background-color: #fff;
827 | }
828 | .bhd #douban-wrapper ::-webkit-scrollbar-thumb{
829 | background-color: #ddd;
830 | }
831 | .btn #douban-wrapper .grid-col1 {
832 | display: none;
833 | }
834 | .hdb #douban-wrapper .grid-col1 {
835 | display: none;
836 | }
837 | .hdt #douban-wrapper .grid-col1 {
838 | display: none;
839 | }
840 | .sc #douban-wrapper .grid-col1 {
841 | display: none;
842 | }
843 | .its #douban-wrapper .grid-col1 {
844 | display: none;
845 | }
846 | .bb #douban-wrapper .grid-col1 {
847 | display: none;
848 | }
849 | .btn #douban-wrapper .grid-col5 {
850 | width: calc(100% - 254px - 36px - 280px);
851 | }
852 | .hdt #douban-wrapper .grid-col5 {
853 | width: calc(100% - 254px - 36px - 280px);
854 | }
855 | .hdb #douban-wrapper .grid-col5 {
856 | width: calc(100% - 254px - 36px - 280px);
857 | }
858 | .sc #douban-wrapper .grid-col5 {
859 | width: calc(100% - 254px - 36px - 280px);
860 | }
861 | .its #douban-wrapper .grid-col5 {
862 | width: calc(100% - 254px - 36px - 280px);
863 | }
864 | .bb #douban-wrapper .grid-col5 {
865 | width: calc(100% - 254px - 36px - 280px);
866 | }
867 | .its #douban-wrapper {
868 | background-color: #131313;
869 | color: #fff;
870 | }
871 | `);
872 |
--------------------------------------------------------------------------------