-
Notifications
You must be signed in to change notification settings - Fork 433
/
index.js
47 lines (39 loc) 路 944 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Rename CustomExtractor
// to fit your publication
export const TheAtlanticExtractor = {
domain: 'www.theatlantic.com',
title: {
selectors: [
'h1.hed',
],
},
author: {
selectors: [
'article#article .article-cover-extra .metadata .byline a',
],
},
content: {
selectors: [
['.article-cover figure.lead-img', '.article-body'],
'.article-body',
],
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: [
],
// Is there anything that is in the result that shouldn't be?
// The clean selectors will remove anything that matches from
// the result
clean: [
'.partner-box',
],
},
date_published: {
selectors: [
['time[itemProp="datePublished"]', 'datetime'],
],
},
lead_image_url: null,
next_page_url: null,
excerpt: null,
};