Added finish methods to downloader and scraper.
This commit is contained in:
parent
ab65c9f15a
commit
7549e5b3f8
@ -16,6 +16,11 @@ class JDownloaderClient {
|
||||
Logger.info(`Connected to JDownloader ${this.device.name}`);
|
||||
}
|
||||
|
||||
async finish() {
|
||||
await this.client.core.disconnect();
|
||||
Logger.info(`Disconnected from JDownloader ${this.device.name}`);
|
||||
}
|
||||
|
||||
async addLinks(media) {
|
||||
if (!(media instanceof Media)) {
|
||||
throw new TypeError('Invalid Media instance passed to downloader!');
|
||||
|
@ -17,6 +17,12 @@ class KissAsianScraper {
|
||||
Logger.info('Cloudflare DDOS Protection bypassed, redirected to main site.');
|
||||
}
|
||||
|
||||
async finish(browser) {
|
||||
await this.page.close();
|
||||
await browser.close();
|
||||
Logger.info('Closed browser instance.');
|
||||
}
|
||||
|
||||
async authenticate(credentials) {
|
||||
await this.page.click('#topHolderBox a[href="/Login"]');
|
||||
await this.page.waitForSelector('#btnSubmit');
|
||||
|
Loading…
Reference in New Issue
Block a user