nurlresolver
Version:
url resolver for node
20 lines • 856 B
JavaScript
import { BaseUrlResolver } from "../BaseResolver.js";
export class LinkritResolver extends BaseUrlResolver {
constructor() {
super({
domains: [/https?:\/\/linkrit\.com/, /https?:\/\/extralinks/, /https?:\/\/(dlink\.)?mobilejsr\.com/, /https?:\/\/dlinks\.dailypotrika/],
useCookies: true
});
}
async resolveInner(_urlToResolve) {
const response = await this.gotInstance(_urlToResolve);
//in linkrit pages it doesn't always ask to verify
let links = this.scrapeAllLinks(response.body, '.view-well');
if (links && links.length > 0)
return links;
const response2Body = await this.postHiddenForm(response.url, response.body);
links = this.scrapeAllLinks(response2Body, '.view-well');
return links;
}
}
//# sourceMappingURL=linkrit.js.map