File tree 12 files changed +313
-22
lines changed
12 files changed +313
-22
lines changed Original file line number Diff line number Diff line change 38
38
"node" : " >=v20.10.0"
39
39
},
40
40
"dependencies" : {
41
- "cheerio" : " 1.0.0-rc.12"
41
+ "cheerio" : " 1.0.0-rc.12" ,
42
+ "jsdom" : " ^24.0.0"
42
43
}
43
44
}
Original file line number Diff line number Diff line change
1
+ import type { Detail , SearchResult } from '../types' ;
2
+
3
+ import { Provider } from '../scraper' ;
4
+
5
+ export class Animate extends Provider {
6
+ constructor ( ) {
7
+ super ( 'animate' ) ;
8
+ }
9
+
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
+ }
13
+
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ import type { Detail , SearchResult } from '../types' ;
2
+
3
+ import { Provider } from '../scraper' ;
4
+
5
+ export class Comiczin extends Provider {
6
+ constructor ( ) {
7
+ super ( 'comiczin' ) ;
8
+ }
9
+
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
+ }
13
+
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ import type { Detail , SearchResult } from '../types' ;
2
+
3
+ import { Provider } from '../scraper' ;
4
+
5
+ export class Gamers extends Provider {
6
+ constructor ( ) {
7
+ super ( 'gamers' ) ;
8
+ }
9
+
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
+ }
13
+
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change 1
1
export * from './scraper' ;
2
2
3
3
export * from './melonbooks' ;
4
+
5
+ export * from './animate' ;
6
+
7
+ export * from './mangaoh' ;
8
+
9
+ export * from './comiczin' ;
10
+
11
+ export * from './gamers' ;
12
+
13
+ export * from './toranoana' ;
Original file line number Diff line number Diff line change
1
+ import type { Detail , SearchResult } from '../types' ;
2
+
3
+ import { Provider } from '../scraper' ;
4
+
5
+ export class Mangaoh extends Provider {
6
+ constructor ( ) {
7
+ super ( 'mangaoh' ) ;
8
+ }
9
+
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
+ }
13
+
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ export class Melonbooks extends Provider {
7
7
super ( 'melonbooks' ) ;
8
8
}
9
9
10
- search ( text : string ) : Promise < SearchResult [ ] > {
11
- throw new Error ( 'Method not implemented.' ) ;
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
12
}
13
13
14
- detail ( url : string ) : Promise < Detail > {
15
- throw new Error ( 'Method not implemented.' ) ;
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ export abstract class Provider {
33
33
34
34
abstract search ( text : string ) : Promise < SearchResult [ ] > ;
35
35
36
- abstract detail ( url : string ) : Promise < Detail > ;
36
+ abstract detail ( url : string ) : Promise < Detail | undefined > ;
37
37
}
Original file line number Diff line number Diff line change
1
+ import type { Detail , SearchResult } from '../types' ;
2
+
3
+ import { Provider } from '../scraper' ;
4
+
5
+ export class Toranoana extends Provider {
6
+ constructor ( ) {
7
+ super ( 'toranoana' ) ;
8
+ }
9
+
10
+ async search ( text : string ) : Promise < SearchResult [ ] > {
11
+ return [ ] ;
12
+ }
13
+
14
+ async detail ( url : string ) : Promise < Detail | undefined > {
15
+ return undefined ;
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments