Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2217de4

Browse files
committed
Fix page algo
1 parent1445fee commit2217de4

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

‎src/VoidScans/VoidScans.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BASE = "https://voidscans.net"
1515

1616
exportconstVoidScansInfo:SourceInfo={
1717
icon:"icon.svg",
18-
version:"1.4.0",
18+
version:"1.4.1",
1919
name:"VoidScans",
2020
author:"PythonCoderAS",
2121
authorWebsite:"https://github.com/PythonCoderAS",

‎src/VoidScans/VoidScansParser.ts‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import{Chapter,LanguageCode,Manga,MangaStatus,MangaTile}from"paperback-extensions-common";
22

33
exportclassVoidScansParser{
4-
5-
pageRegex=/src:"(https:\/\/beta\.voidscans\.net\/[^\s"']+)"/g
6-
74
parseMangaList($:CheerioStatic,base:string){
85
constmangaTiles:MangaTile[]=[];
96
$("div.col").map((index,element)=>{
@@ -62,13 +59,12 @@ export class VoidScansParser {
6259

6360
parsePages($:CheerioStatic):string[]{
6461
constpages:string[]=[];
65-
constdata=$("script:not([src])[type]").html();
66-
if(data){
67-
constmatches=[...data.matchAll(this.pageRegex)];
68-
for(leti=0;i<matches.length;i++){
69-
pages.push(matches[i][1])
62+
63+
$("#slideshow-container img").map((index,element)=>{
64+
if(element.attribs["src"]){
65+
pages.push(element.attribs["src"])
7066
}
71-
}
67+
})
7268
returnpages;
7369
}
7470

‎src/tests/VoidScans.test.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("VoidScans Tests", function () {
1010
letchaiAsPromised=require("chai-as-promised");
1111
chai.use(chaiAsPromised);
1212

13-
letmangaId="2";
13+
letmangaId="6";
1414

1515
it("Retrieve Manga Details",async()=>{
1616
letdetails=awaitwrapper.getMangaDetails(source,mangaId);
@@ -77,11 +77,4 @@ describe("VoidScans Tests", function () {
7777
expect(subitem.image,"No Image found for homepage item").to.not.be.empty;
7878
}
7979
})
80-
81-
it("Testing Notifications",async()=>{
82-
letupdates=awaitwrapper.filterUpdatedManga(source,newDate("2021-1-27"),[mangaId])
83-
expect(updates,"No server response").to.exist
84-
expect(updates,"Empty server response").to.not.be.empty
85-
expect(updates[0],"No updates").to.not.be.empty;
86-
})
8780
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp