import {Post, Tag} from "../type/generic";
/**
* The base class of the scrappers, any of the website scrappers must extend this class
*/
export class Scrapper {
constructor(domain: string) {
// Set the domain
this.domain = domain;
};
* An array of all of the logs
public logs: Array<any> = [];
* The fully qualified domain of the website to scrap, for example "rule34.life"
public domain: string = ``;
* Get the details of a specific post
* @param url The URL to the post, this must be the actual page which contains the image, tags, etc...
public async getPostDetails( url: string ): Promise<Post | null> {
return null;
}
* Get a list of posts from the mentioned page
* @param url
* @returns
public async getPostsFromPage( url: string ): Promise<Array<Post>> {
return [];