diff --git a/fixtures/obamawhitehouse.archives.gov/1490375478954.html b/fixtures/obamawhitehouse.archives.gov/1490375478954.html new file mode 100644 index 00000000..157b85fa --- /dev/null +++ b/fixtures/obamawhitehouse.archives.gov/1490375478954.html @@ -0,0 +1,633 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Serve and Remember | whitehouse.gov + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ + + + + +
+
+
+
+ + + + This is historical material “frozen in time”. The website is no longer updated and links to external websites and some internal pages may not work. + +
+
+
+
+
+ + +
+ + +
+
+ + + + + +
+
+
+
+
+
+ + + +
+
+
+
+
+ + + + + +
+
+ + + + + +
+
+ + + +

Serve and Remember

+ + +
+ + +
+ +
+
+ + + +
Summary: 
September 11th has been designated as a National Day of Service and Remembrance. Throughout the weekend, Americans from across the country will be participating in service projects to honor those whose lives were lost in the horrific attacks on our country on September 11, 2001.
+ +
+
+ +
+
+ + + +

+ September 11th has been designated as a National Day of Service and Remembrance. Throughout the weekend, Americans from across the country will be participating in service projects to honor those whose lives were lost in the horrific attacks on our country on September 11, 2011.

+

+ Check out Serve.gov to find a service opportunity in your area.

+

+

+

+ Be sure to check out President Obama’s recent weekly address where he called on the American people to come together in the spirit of service and remembrance as we approach the tenth anniversary of the September 11th attacks.  Even the smallest actions can demonstrate that our sense of common purpose is just as strong today as it was ten years ago. 

+

+ Throughout the week, Cabinet Secretaries have been sharing their reflections on the 10th Anniversary of the September 11th attacks.  Take a look at their videos.

+ +
+ +
+ + +
+
+ +
+
+
+ + + + + + + + + + + + + + + diff --git a/src/extractors/custom/obamawhitehouse.archives.gov/index.js b/src/extractors/custom/obamawhitehouse.archives.gov/index.js index e2011699..2b160674 100644 --- a/src/extractors/custom/obamawhitehouse.archives.gov/index.js +++ b/src/extractors/custom/obamawhitehouse.archives.gov/index.js @@ -38,6 +38,8 @@ export const ObamawhitehouseArchivesGovExtractor = { }, content: { + defaultCleaner: false, + selectors: [ 'div#content-start', '.pane-node-field-forall-body', diff --git a/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js b/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js index b81b60b2..9eedba39 100644 --- a/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js +++ b/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js @@ -141,4 +141,27 @@ describe('ObamawhitehouseArchivesGovExtractor', () => { assert.equal($('iframe[src*="youtube"]').length, 1); }); }); + + describe('handles this previously empty post', () => { + let result; + let url; + beforeAll(() => { + url = + 'https://obamawhitehouse.archives.gov/blog/2011/09/10/serve-and-remember'; + const html = + fs.readFileSync('./fixtures/obamawhitehouse.archives.gov/1490375478954.html'); + result = + Mercury.parse(url, html, { fallback: false }); + }); + + it('gets the content', async () => { + const { content } = await result; + + const $ = cheerio.load(content || ''); + + const first13 = excerptContent($('*').first().text(), 13); + + assert.equal(first13, 'September 11th has been designated as a National Day of Service and Remembrance.'); + }); + }); });