Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fetch from "fetch";
- class WebScraper {
- public download(link) {
- const page = fetch(link);
- if (page.status === "OK") {
- this.cache.add(link, page);
- } else {
- this.scheduler.schedule(link);
- }
- }
- }
Add Comment
Please, Sign In to add comment