mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: 电影天堂切换到同类网站阳光电影 (#3517)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const iconv = require('iconv-lite');
|
||||
|
||||
const baseURL = 'https://www.ygdy8.net';
|
||||
async function load(link, ctx) {
|
||||
const cache = await ctx.cache.get(link);
|
||||
if (cache) {
|
||||
@@ -20,7 +20,7 @@ async function load(link, ctx) {
|
||||
}
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got.get('https://www.dytt8.net/index0.html', {
|
||||
const response = await got.get(baseURL, {
|
||||
responseType: 'buffer',
|
||||
});
|
||||
response.data = iconv.decode(response.data, 'gb2312');
|
||||
@@ -35,7 +35,7 @@ module.exports = async (ctx) => {
|
||||
const process = await Promise.all(
|
||||
list.map(async (item) => {
|
||||
const link = $(item).find('a:nth-of-type(2)');
|
||||
const itemUrl = 'http://www.dytt8.net' + link.attr('href');
|
||||
const itemUrl = baseURL + link.attr('href');
|
||||
const other = await load(itemUrl, ctx);
|
||||
|
||||
return {
|
||||
@@ -54,8 +54,8 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
const data = {
|
||||
title: '电影天堂',
|
||||
link: 'http://www.dytt8.net',
|
||||
title: '电影天堂/阳光电影',
|
||||
link: baseURL,
|
||||
description: '电影天堂RSS',
|
||||
item: process,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user