New Server (#785)

* New Server

* Fix typo

* Fix typo

* Fix typo

* Fix (vpc)

* New Server **under construction**

* Fix 😐

* Removed user specific file from check-in

* Removed incomplete website from check-in

* Fixed tags and removed debug output

Co-authored-by: ronny1982 <wegener.ronny@gmail.com>
This commit is contained in:
Edwin Marroquin 2019-12-21 01:59:55 -05:00 committed by ronny1982
parent ad66b378d8
commit 78dc5b4660
4 changed files with 62 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
CNAME
yarn.lock
package-lock.json
node_modules
*.tar.bz2

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -9,8 +9,10 @@ export default class NewToki extends Connector {
super.label = 'NewToki';
this.tags = [ 'manga', 'webtoon', 'korean' ];
this.url = 'https://newtoki38.com';
//this.urlComic = 'https://newtoki38.net';
//this.urlWebtoon = 'https://newtoki38.com';
/*
* this.urlComic = 'https://newtoki38.net';
* this.urlWebtoon = 'https://newtoki38.com';
*/
this.path = [ '/webtoon', '/comic' ];
}

View File

@ -0,0 +1,57 @@
import Connector from '../engine/Connector.mjs';
export default class VerComicsPorno extends Connector {
constructor() {
super();
super.id = 'vercomicsporno';
super.label = 'VerComicsPorno';
this.tags = ['porn' ,'spanish'];
this.url = 'http://vercomicsporno.com';
this.path = '/page';
this.queryMangas = '#posts .gallery > a';
this.pager = 'ul.pagination li:last-of-type a';
this.listPages = '#posts source.lazy:not(:last-child)';
}
async _getMangasFromPage(page) {
let request = new Request(this.url + this.path + page, this.requestOptions);
let data = await this.fetchDOM(request, this.queryMangas);
return data.map(element => {
this.cfMailDecrypt(element);
return {
id: this.getRootRelativeOrAbsoluteLink(element, request.url),
title: element.href.split('/')[3].replace(/(-)/g,' ')
};
}).filter(manga => manga.id.startsWith('/'));
}
async _getMangas() {
let mangaList = [];
let request = new Request(this.url + this.path + '1' , this.requestOptions);
let data = await this.fetchDOM(request, this.pager);
let pageCount = parseInt(data[0].href.match(/\d+$/));
for(let page = 1; page <= pageCount; page++) {
let mangas = await this._getMangasFromPage(page);
mangaList.push(...mangas);
}
return mangaList;
}
async _getChapters(manga) {
return [{
id: manga.id,
title: manga.title,
language: ''
}];
}
async _getPages(chapter) {
let request = new Request(this.url + chapter.id, this.requestOptions);
let data = await this.fetchDOM(request, this.listPages);
return data.map(element => {
return element.dataset['lazySrc'];
});
}
}