summaryrefslogtreecommitdiff
path: root/js/template.js
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-17 20:31:44 +0200
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-17 20:31:44 +0200
commit1a9af21755a78bb8689bd1f3830239f81dadc324 (patch)
tree9ea058f18efbb7ab799eafa8b2c772f2fb37571c /js/template.js
parent8f55226a53682f9f4a0b63778b3338451605a6c3 (diff)
refactor
Diffstat (limited to 'js/template.js')
-rw-r--r--js/template.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/template.js b/js/template.js
index f75df28..56fffa0 100644
--- a/js/template.js
+++ b/js/template.js
@@ -1,9 +1,9 @@
-import { parse } from "flyscrape";
+import { parse } from 'flyscrape';
export const options = {
- url: "https://news.ycombinator.com/", // Specify the URL to start scraping from.
+ url: 'https://news.ycombinator.com/', // Specify the URL to start scraping from.
depth: 1, // Specify how deep links should be followed. (default = 0, no follow)
- allowedDomains: ["news.ycombinator.com"], // Specify the allowed domains. (default = domain from url)
+ allowedDomains: ['news.ycombinator.com'], // Specify the allowed domains. (default = domain from url)
blockedDomains: [], // Specify the blocked domains. (default = none)
rate: 100, // Specify the rate in requests per second. (default = 100)
}
@@ -13,7 +13,7 @@ export default function({ html, url }) {
const title = $('title');
const entries = $('.athing').toArray();
- if (entries.length == 0) {
+ if (!entries.length) {
return null; // Omits scraped pages without entries.
}