2021-03-05 11:27:36 +00:00
|
|
|
/// <reference types="cheerio" />
|
|
|
|
export interface IPostElement {
|
2021-03-05 12:06:09 +00:00
|
|
|
type: "Empty" | "Text" | "Link" | "Image" | "Spoiler";
|
|
|
|
name: string;
|
|
|
|
text: string;
|
|
|
|
content: IPostElement[];
|
2021-03-05 11:27:36 +00:00
|
|
|
}
|
|
|
|
export interface ILink extends IPostElement {
|
2021-03-05 12:06:09 +00:00
|
|
|
type: "Image" | "Link";
|
|
|
|
href: string;
|
2021-03-05 11:27:36 +00:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Given a post of a thread page it extracts the information contained in the body.
|
|
|
|
*/
|
2021-03-05 12:06:09 +00:00
|
|
|
export declare function parseF95ThreadPost(
|
|
|
|
$: cheerio.Root,
|
|
|
|
post: cheerio.Cheerio
|
|
|
|
): IPostElement[];
|