mgbuild 1.9.5 → 1.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,6 @@
1
1
  declare const _default: {
2
2
  manga: {
3
3
  SCRAPE_BASE_URL: string;
4
- EMPTY_THUMB: string;
5
- EMPTY_BACKGROUND: string;
6
4
  };
7
5
  };
8
6
  export default _default;
@@ -1,8 +1,6 @@
1
1
  declare const _default: {
2
2
  manga: {
3
3
  SCRAPE_BASE_URL: string;
4
- EMPTY_THUMB: string;
5
- EMPTY_BACKGROUND: string;
6
4
  };
7
5
  };
8
6
  export default _default;
@@ -0,0 +1,3 @@
1
+ export declare function getChapter(content: string): Promise<{
2
+ pages: string[];
3
+ } | undefined>;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ manga: {
3
+ SCRAPE_BASE_URL: string;
4
+ };
5
+ };
6
+ export default _default;
@@ -0,0 +1,75 @@
1
+ declare const _default: {
2
+ manga: {
3
+ referer: string;
4
+ accept: string;
5
+ "accept-language": string;
6
+ "cache-control": string;
7
+ priority: string;
8
+ pragma: string;
9
+ "sec-ch-ua": string;
10
+ "sec-ch-ua-mobile": string;
11
+ "sec-ch-ua-platform": string;
12
+ "sec-fetch-dest": string;
13
+ "sec-fetch-mode": string;
14
+ "sec-fetch-site": string;
15
+ "sec-fetch-user": string;
16
+ "sec-gpc": string;
17
+ "upgrade-insecure-requests": string;
18
+ "user-agent": string;
19
+ };
20
+ chapter: {
21
+ referer: string;
22
+ accept: string;
23
+ "accept-language": string;
24
+ "cache-control": string;
25
+ priority: string;
26
+ pragma: string;
27
+ "sec-ch-ua": string;
28
+ "sec-ch-ua-mobile": string;
29
+ "sec-ch-ua-platform": string;
30
+ "sec-fetch-dest": string;
31
+ "sec-fetch-mode": string;
32
+ "sec-fetch-site": string;
33
+ "sec-fetch-user": string;
34
+ "sec-gpc": string;
35
+ "upgrade-insecure-requests": string;
36
+ "user-agent": string;
37
+ };
38
+ chapterList: {
39
+ accept: string;
40
+ "accept-language": string;
41
+ "content-type": string;
42
+ "next-action": string;
43
+ origin: string;
44
+ priority: string;
45
+ referer: string;
46
+ "sec-ch-ua": string;
47
+ "sec-ch-ua-mobile": string;
48
+ "sec-ch-ua-platform": string;
49
+ "sec-fetch-dest": string;
50
+ "sec-fetch-mode": string;
51
+ "sec-fetch-site": string;
52
+ "sec-gpc": string;
53
+ "user-agent": string;
54
+ Cookie: string;
55
+ };
56
+ recent: {
57
+ referer: string;
58
+ accept: string;
59
+ "accept-language": string;
60
+ "cache-control": string;
61
+ priority: string;
62
+ pragma: string;
63
+ "sec-ch-ua": string;
64
+ "sec-ch-ua-mobile": string;
65
+ "sec-ch-ua-platform": string;
66
+ "sec-fetch-dest": string;
67
+ "sec-fetch-mode": string;
68
+ "sec-fetch-site": string;
69
+ "sec-fetch-user": string;
70
+ "sec-gpc": string;
71
+ "upgrade-insecure-requests": string;
72
+ "user-agent": string;
73
+ };
74
+ };
75
+ export default _default;
@@ -0,0 +1,18 @@
1
+ type Log = {
2
+ type: "ping" | "error";
3
+ method: string;
4
+ url: string;
5
+ time: string;
6
+ };
7
+ type Logger = (log: Log) => any;
8
+ export declare class Scraper {
9
+ private logger?;
10
+ constructor(logger?: Logger);
11
+ chapterList(manga_code: string, slug: string, page?: number): Promise<import("../..").ScrapedHostChapter[] | undefined>;
12
+ manga(manga_code: string): Promise<import("../..").ScrapedManga>;
13
+ chapterById(chapter_id: string | number): Promise<{
14
+ pages: string[];
15
+ } | undefined>;
16
+ recents(_page?: number): Promise<import("../..").RecentScrapeList[]>;
17
+ }
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ScrapedHostChapter, ScrapedManga } from "../../@types";
2
+ export declare function getChapters(content: string, slug: string): ScrapedHostChapter[] | undefined;
3
+ export declare function getManga(content: string, slug: string): ScrapedManga;
@@ -0,0 +1,3 @@
1
+ /// <reference types="cheerio" />
2
+ import { RecentScrapeList } from "../../@types";
3
+ export declare function getRecentList($: cheerio.Root): RecentScrapeList[];
@@ -1,8 +1,6 @@
1
1
  declare const _default: {
2
2
  manga: {
3
3
  SCRAPE_BASE_URL: string;
4
- EMPTY_THUMB: string;
5
- EMPTY_BACKGROUND: string;
6
4
  };
7
5
  };
8
6
  export default _default;
@@ -1,8 +1,6 @@
1
1
  declare const _default: {
2
2
  manga: {
3
3
  SCRAPE_BASE_URL: string;
4
- EMPTY_THUMB: string;
5
- EMPTY_BACKGROUND: string;
6
4
  };
7
5
  };
8
6
  export default _default;
@@ -1,8 +1,6 @@
1
1
  declare const _default: {
2
2
  manga: {
3
3
  SCRAPE_BASE_URL: string;
4
- EMPTY_THUMB: string;
5
- EMPTY_BACKGROUND: string;
6
4
  };
7
5
  };
8
6
  export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="cheerio" />
2
+ export declare function getChapter($: cheerio.Root): Promise<{
3
+ pages: string[];
4
+ }>;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ manga: {
3
+ SCRAPE_BASE_URL: string;
4
+ };
5
+ };
6
+ export default _default;
@@ -0,0 +1,70 @@
1
+ declare const _default: {
2
+ manga: {
3
+ accept: string;
4
+ "accept-language": string;
5
+ "cache-control": string;
6
+ priority: string;
7
+ pragma: string;
8
+ "sec-ch-ua": string;
9
+ "sec-ch-ua-mobile": string;
10
+ "sec-ch-ua-platform": string;
11
+ "sec-fetch-dest": string;
12
+ "sec-fetch-mode": string;
13
+ "sec-fetch-site": string;
14
+ "sec-fetch-user": string;
15
+ "sec-gpc": string;
16
+ "upgrade-insecure-requests": string;
17
+ "user-agent": string;
18
+ };
19
+ chapter: {
20
+ accept: string;
21
+ "accept-language": string;
22
+ "cache-control": string;
23
+ priority: string;
24
+ pragma: string;
25
+ "sec-ch-ua": string;
26
+ "sec-ch-ua-mobile": string;
27
+ "sec-ch-ua-platform": string;
28
+ "sec-fetch-dest": string;
29
+ "sec-fetch-mode": string;
30
+ "sec-fetch-site": string;
31
+ "sec-fetch-user": string;
32
+ "sec-gpc": string;
33
+ "upgrade-insecure-requests": string;
34
+ "user-agent": string;
35
+ };
36
+ chapterList: {
37
+ accept: string;
38
+ "accept-language": string;
39
+ "cache-control": string;
40
+ pragma: string;
41
+ priority: string;
42
+ "sec-ch-ua": string;
43
+ "sec-ch-ua-mobile": string;
44
+ "sec-ch-ua-platform": string;
45
+ "sec-fetch-dest": string;
46
+ "sec-fetch-mode": string;
47
+ "sec-fetch-site": string;
48
+ "sec-gpc": string;
49
+ "x-requested-with": string;
50
+ "Referrer-Policy": string;
51
+ };
52
+ recent: {
53
+ accept: string;
54
+ "accept-language": string;
55
+ "cache-control": string;
56
+ priority: string;
57
+ pragma: string;
58
+ "sec-ch-ua": string;
59
+ "sec-ch-ua-mobile": string;
60
+ "sec-ch-ua-platform": string;
61
+ "sec-fetch-dest": string;
62
+ "sec-fetch-mode": string;
63
+ "sec-fetch-site": string;
64
+ "sec-fetch-user": string;
65
+ "sec-gpc": string;
66
+ "upgrade-insecure-requests": string;
67
+ "user-agent": string;
68
+ };
69
+ };
70
+ export default _default;
@@ -0,0 +1,21 @@
1
+ type Log = {
2
+ type: "ping" | "error";
3
+ method: string;
4
+ url: string;
5
+ time: string;
6
+ };
7
+ type Logger = (log: Log) => any;
8
+ export declare class Scraper {
9
+ private logger?;
10
+ constructor(logger?: Logger);
11
+ private chapterList;
12
+ manga(manga_code: string): Promise<import("../..").ScrapedManga>;
13
+ chapterById(chapter_id: string | number): Promise<{
14
+ pages: string[];
15
+ }>;
16
+ chapter(manga_code: string, chapter_number: number): Promise<{
17
+ pages: string[];
18
+ }>;
19
+ recents(page?: number): Promise<import("../..").RecentScrapeList[]>;
20
+ }
21
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="cheerio" />
2
+ import { ScrapedHostChapter, ScrapedManga } from "../../@types";
3
+ export declare function getChapters($: cheerio.Root, slug: string): ScrapedHostChapter[];
4
+ export declare function getManga($: cheerio.Root, slug: string): ScrapedManga;
@@ -0,0 +1,58 @@
1
+ /// <reference types="cheerio" />
2
+ import { RecentScrapeList } from "../../@types";
3
+ export type RawScrapeItem = {
4
+ obr_id: number;
5
+ obr_nome: string;
6
+ obr_outros_nomes: string[];
7
+ obr_descricao: string;
8
+ formt_id: number;
9
+ stt_id: number;
10
+ obr_status: string;
11
+ obr_imagem: string;
12
+ obr_imagem_fundo: any;
13
+ obr_visualizacoes: number;
14
+ obr_criada_em: string;
15
+ obr_atualizado_em: string;
16
+ obr_slug: string;
17
+ obr_mais_18: boolean;
18
+ obr_vip: boolean;
19
+ scan_id: number;
20
+ parceira_id: any;
21
+ formato: Formato;
22
+ status: Status;
23
+ tags: Tag[];
24
+ total_capitulos: number;
25
+ ultimos_capitulos: LastChapters[];
26
+ favorito: boolean;
27
+ total_lidos: number;
28
+ genero: Genere;
29
+ rating: number;
30
+ total_rating: number;
31
+ };
32
+ export type Formato = {
33
+ formt_id: number;
34
+ formt_nome: string;
35
+ };
36
+ export type Status = {
37
+ stt_id: number;
38
+ stt_nome: string;
39
+ stt_cor: string;
40
+ };
41
+ export type Tag = {
42
+ tag_id: number;
43
+ tag_nome: string;
44
+ };
45
+ export type LastChapters = {
46
+ cap_id: number;
47
+ cap_nome: string;
48
+ cap_numero: number;
49
+ cap_lancado_em: string;
50
+ cap_new: boolean;
51
+ cap_lido: boolean;
52
+ cap_disponivel: boolean;
53
+ };
54
+ export type Genere = {
55
+ gen_id: number;
56
+ gen_nome: string;
57
+ };
58
+ export declare function getRecentList($: cheerio.Root): RecentScrapeList[];
@@ -26,3 +26,4 @@ export declare function unionChapterNumberFormat(chapter_number: number): string
26
26
  export declare function atob(data: string): string;
27
27
  export declare function btoa(data: string): string;
28
28
  export declare function removeDuplicates<T>(array: T[], callback: (a: T) => unknown): NonNullable<T>[];
29
+ export declare function extractContentRegex(content: string, regex: RegExp): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mgbuild",
3
- "version": "1.9.5",
3
+ "version": "1.9.7",
4
4
  "scripts": {},
5
5
  "description": "",
6
6
  "main": "lib/index.js",