Merge pull request #11 from postlight/feat-politico-extractor
feat: added politico extractorpull/12/head
commit
3c99404566
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,67 @@
|
||||
// Rename CustomExtractor
|
||||
// to fit your publication
|
||||
// (e.g., NYTimesExtractor)
|
||||
export const PoliticoExtractor = {
|
||||
domain: 'www.politico.com',
|
||||
title: {
|
||||
selectors: [
|
||||
// enter title selectors
|
||||
['meta[name="og:title"]', 'value'],
|
||||
],
|
||||
},
|
||||
|
||||
author: {
|
||||
selectors: [
|
||||
// enter author selectors
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
content: {
|
||||
selectors: [
|
||||
// enter content selectors
|
||||
'.story-main-content',
|
||||
'.content-group', '.story-core',
|
||||
'.story-text',
|
||||
],
|
||||
|
||||
// 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: [
|
||||
'figcaption',
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
date_published: {
|
||||
selectors: [
|
||||
// enter date selectors
|
||||
['.timestamp[time="datetime"]'],
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
lead_image_url: {
|
||||
selectors: [
|
||||
// enter lead_image_url selectors
|
||||
['meta[name="og:image"]', 'value'],
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
dek: {
|
||||
selectors: [
|
||||
['meta[name="description"]', 'value'],
|
||||
],
|
||||
},
|
||||
|
||||
next_page_url: null,
|
||||
|
||||
excerpt: null,
|
||||
};
|
Loading…
Reference in New Issue