This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
HentaiSnatcher/src/test.ts

27 lines
686 B
TypeScript
Raw Normal View History

2021-10-21 01:23:48 +03:00
// This is the test file for the library, different tests are ran in here.
import {Rule34xxx} from "./module/rule34xxx";
import {Post} from "./type/generic";
( async () => {
// Initialize the rule34 module
const r34: Rule34xxx = new Rule34xxx();
r34.verbose = true;
// Run the get post Details function
let postDetails: Array<string>;
await r34.crawlPages(`https://rule34.xxx/index.php?page=post&s=list&tags=thelorope`, 35)
.then( postData => {
postDetails = postData;
})
.catch( err => {
console.log(err);
});
// Display results
console.log({
logs: r34.logs,
result: postDetails
});
})();