Skip to content

Commit 00f8965

Browse files
authored
fix: cleaning up deks (#44)
We've solidified what we consider a dek. This PR removes the dek selectors that do not fit that mold.
1 parent b415d1d commit 00f8965

File tree

23 files changed

+0
-206
lines changed

23 files changed

+0
-206
lines changed

src/extractors/custom/fandom.wikia.com/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const WikiaExtractor = {
5151

5252
dek: {
5353
selectors: [
54-
['meta[name="og:description"]', 'value'],
5554
],
5655
},
5756

src/extractors/custom/www.apartmenttherapy.com/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export const ApartmentTherapyExtractor = {
5353

5454
dek: {
5555
selectors: [
56-
['meta[name=description]', 'value'],
5756
],
5857
},
5958

src/extractors/custom/www.apartmenttherapy.com/index.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,6 @@ describe('CustomExtractor', () => {
6969
assert.equal(date_published, '2016-10-13T21:00:00.000Z');
7070
});
7171

72-
it('returns the dek', async () => {
73-
// To pass this test, fill out the dek selector
74-
// in ./src/extractors/custom/www.apartmenttherapy.com/index.js.
75-
const html =
76-
fs.readFileSync('./fixtures/www.apartmenttherapy.com/1476396697639.html');
77-
const articleUrl =
78-
'http://www.apartmenttherapy.com/a-light-filled-la-loft-236564';
79-
80-
const { dek } =
81-
await Mercury.parse(articleUrl, html, { fallback: false });
82-
83-
// Update these values with the expected values from
84-
// the article.
85-
assert.equal(dek, "Name: Ashley Location: Downtown — Los Angeles, California Welcome to our sunny and spacious downtown home located in the in the heart of Downtown LA's Historic Core. Inside you'll find a 1,300 square foot bi-level ground unit with loft (only three of its kind!) that offers an unparalleled, refined industrial, modern aesthetic.");
86-
});
87-
8872
it('returns the lead_image_url', async () => {
8973
// To pass this test, fill out the lead_image_url selector
9074
// in ./src/extractors/custom/www.apartmenttherapy.com/index.js.

src/extractors/custom/www.broadwayworld.com/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const BroadwayWorldExtractor = {
4747

4848
dek: {
4949
selectors: [
50-
['meta[name="og:description"]', 'value'],
5150
],
5251
},
5352

src/extractors/custom/www.broadwayworld.com/index.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,6 @@ describe('CustomExtractor', () => {
6969
assert.equal(date_published, '2016-10-13T19:35:00.000Z');
7070
});
7171

72-
it('returns the dek', async () => {
73-
// To pass this test, fill out the dek selector
74-
// in ./src/extractors/custom/www.broadwayworld.com/index.js.
75-
const html =
76-
fs.readFileSync('./fixtures/www.broadwayworld.com/1476392567143.html');
77-
const articleUrl =
78-
'http://www.broadwayworld.com/article/American-Theatre-Wing-Launches-Andrew-Lloyd-Webber-Training-Scholarships-20161013';
79-
80-
const { dek } =
81-
await Mercury.parse(articleUrl, html, { fallback: false });
82-
83-
// Update these values with the expected values from
84-
// the article.
85-
assert.equal(dek, 'The American Theatre Wing announced today that their Andrew Lloyd Webber Initiative has launched its second initiative program, the Training Scholarships, bridging the gap between talent and opportunity and creating a strong pipeline to the professional theatre for promising artists of all backgrounds.');
86-
});
87-
8872
it('returns the lead_image_url', async () => {
8973
// To pass this test, fill out the lead_image_url selector
9074
// in ./src/extractors/custom/www.broadwayworld.com/index.js.

src/extractors/custom/www.buzzfeed.com/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const BuzzfeedExtractor = {
5656

5757
dek: {
5858
selectors: [
59-
['meta[name="description"]', 'value'],
6059
],
6160
},
6261

src/extractors/custom/www.buzzfeed.com/index.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,6 @@ describe('BuzzfeedExtractor', () => {
6969
// // assert.equal(date_published, 'hi');
7070
// });
7171

72-
it('returns the dek', async () => {
73-
// To pass this test, fill out the dek selector
74-
// in ./src/extractors/custom/www.buzzfeed.com/index.js.
75-
const html =
76-
fs.readFileSync('./fixtures/www.buzzfeed.com/1475531975121.html');
77-
const articleUrl =
78-
'https://www.buzzfeed.com/ikrd/people-are-calling-out-this-edited-picture-of-demi-lovato-fo';
79-
80-
const { dek } =
81-
await Mercury.parse(articleUrl, html, { fallback: false });
82-
83-
// Update these values with the expected values from
84-
// the article.
85-
assert.equal(dek, 'Lovato said: "Is that how my boobs should look?"..');
86-
});
87-
8872
it('returns the lead_image_url', async () => {
8973
// To pass this test, fill out the lead_image_url selector
9074
// in ./src/extractors/custom/www.buzzfeed.com/index.js.

src/extractors/custom/www.cnn.com/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ export const WwwCnnComExtractor = {
2020
],
2121
},
2222

23-
dek: null,
24-
2523
lead_image_url: {
2624
selectors: [
2725
['meta[name="og:image"]', 'value'],

src/extractors/custom/www.cnn.com/index.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ describe('WwwCnnComExtractor', () => {
6666
assert.equal(date_published, '2016-11-29T10:39:35.000Z');
6767
});
6868

69-
it('returns the dek', async () => {
70-
// To pass this test, fill out the dek selector
71-
// in ./src/extractors/custom/www.cnn.com/index.js.
72-
const html =
73-
fs.readFileSync('./fixtures/www.cnn.com/1480458253239.html');
74-
const articleUrl =
75-
'http://www.cnn.com/2016/11/29/politics/donald-trump-transition-presidency/index.html';
76-
77-
const { dek } =
78-
await Mercury.parse(articleUrl, html, { fallback: false });
79-
80-
// Update these values with the expected values from
81-
// the article.
82-
assert.equal(dek, null);
83-
});
84-
8569
it('returns the lead_image_url', async () => {
8670
// To pass this test, fill out the lead_image_url selector
8771
// in ./src/extractors/custom/www.cnn.com/index.js.

src/extractors/custom/www.littlethings.com/index.test.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,6 @@ describe('LittleThingsExtractor', () => {
5353
assert.equal(author, 'Laura Caseley');
5454
});
5555

56-
// it('returns the date_published', async () => {
57-
// // To pass this test, fill out the date_published selector
58-
// // in ./src/extractors/custom/www.littlethings.com/index.js.
59-
// const html =
60-
// fs.readFileSync('./fixtures/www.littlethings.com/1475605036506.html');
61-
// const articleUrl =
62-
// 'http://www.littlethings.com/diy-pineapple-lamp/';
63-
//
64-
// const { date_published } =
65-
// await Mercury.parse(articleUrl, html, { fallback: false });
66-
//
67-
// // Update these values with the expected values from
68-
// // the article.
69-
// assert.equal(date_published, '');
70-
// });
71-
72-
// it('returns the dek', async () => {
73-
// // To pass this test, fill out the dek selector
74-
// // in ./src/extractors/custom/www.littlethings.com/index.js.
75-
// const html =
76-
// fs.readFileSync('./fixtures/www.littlethings.com/1475605036506.html');
77-
// const articleUrl =
78-
// 'http://www.littlethings.com/diy-pineapple-lamp/';
79-
//
80-
// const { dek } =
81-
// await Mercury.parse(articleUrl, html, { fallback: false });
82-
//
83-
// // Update these values with the expected values from
84-
// // the article.
85-
// assert.equal(dek, '');
86-
// });
87-
8856
it('returns the lead_image_url', async () => {
8957
// To pass this test, fill out the lead_image_url selector
9058
// in ./src/extractors/custom/www.littlethings.com/index.js.

0 commit comments

Comments
 (0)