fix(source): Madara
This commit is contained in:
@@ -87,15 +87,14 @@ const parseNovelAndChapters = async novelUrl => {
|
||||
|
||||
let novelChapters = [];
|
||||
|
||||
const novelId = $('#manga-chapters-holder').attr('data-id');
|
||||
// const novelId = $('#manga-chapters-holder').attr('data-id');
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('action', 'manga_get_chapters');
|
||||
formData.append('manga', novelId);
|
||||
// let formData = new FormData();
|
||||
// formData.append('action', 'manga_get_chapters');
|
||||
// formData.append('manga', novelId);
|
||||
|
||||
const data = await fetch('https://www.arnovel.me/wp-admin/admin-ajax.php', {
|
||||
const data = await fetch(`${url}ajax/chapters/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
const text = await data.text();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ const parseNovelAndChapters = async novelUrl => {
|
||||
const result = await fetch(url);
|
||||
const body = await result.text();
|
||||
|
||||
const $ = cheerio.load(body);
|
||||
let $ = cheerio.load(body);
|
||||
|
||||
let novel = {};
|
||||
|
||||
@@ -96,7 +96,12 @@ const parseNovelAndChapters = async novelUrl => {
|
||||
|
||||
let novelChapters = [];
|
||||
|
||||
$('.wp-manga-chapter').each(function (result) {
|
||||
const data = await fetch(`${url}ajax/chapters/`, {method: 'POST'});
|
||||
const text = await data.text();
|
||||
|
||||
$ = cheerio.load(text);
|
||||
|
||||
$('.wp-manga-chapter').each(function () {
|
||||
const chapterName = $(this)
|
||||
.find('a')
|
||||
.text()
|
||||
|
||||
@@ -91,19 +91,15 @@ const parseNovelAndChapters = async novelUrl => {
|
||||
|
||||
let novelChapters = [];
|
||||
|
||||
const novelId = $('#manga-chapters-holder').attr('data-id');
|
||||
// const novelId = $('#manga-chapters-holder').attr('data-id');
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('action', 'manga_get_chapters');
|
||||
formData.append('manga', novelId);
|
||||
// let formData = new FormData();
|
||||
// formData.append('action', 'manga_get_chapters');
|
||||
// formData.append('manga', novelId);
|
||||
|
||||
const data = await fetch(
|
||||
'https://www.foxaholic.com/wp-admin/admin-ajax.php',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
},
|
||||
);
|
||||
const data = await fetch(`${url}ajax/chapters/`, {
|
||||
method: 'POST',
|
||||
});
|
||||
const text = await data.text();
|
||||
|
||||
$ = cheerio.load(text);
|
||||
|
||||
@@ -14,10 +14,10 @@ const popularNovels = async page => {
|
||||
let novels = [];
|
||||
|
||||
$('.page-item-detail').each(function (result) {
|
||||
const novelName = $(this).find('h5 > a').text();
|
||||
const novelName = $(this).find('.h5 > a').text();
|
||||
const novelCover = $(this).find('img').attr('src');
|
||||
|
||||
let novelUrl = $(this).find('h5 > a').attr('href');
|
||||
let novelUrl = $(this).find('.h5 > a').attr('href');
|
||||
novelUrl = novelUrl.replace(`${baseUrl}vipnovel/`, '');
|
||||
|
||||
const novel = {
|
||||
|
||||
@@ -82,7 +82,7 @@ const parseNovelAndChapters = async novelUrl => {
|
||||
|
||||
let novelChapters = [];
|
||||
|
||||
console.log(`${url}ajax/chapters/`);
|
||||
// console.log(`${url}ajax/chapters/`);
|
||||
const data = await fetch(`${url}ajax/chapters/`, {method: 'POST'});
|
||||
const text = await data.text();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user