Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d18fd99
feat: Refactor and update fixtures
postlight-org Aug 10, 2022
3700876
Remove reference to deleted extractor
postlight-org Aug 10, 2022
98b2cb6
feat: first batch of test and parser updates due to new fixtures
Sep 28, 2022
6d339be
feat: update more custom parsers and unit tests
Oct 5, 2022
b46ea57
Merge branch 'main' into move-fixtures
Oct 7, 2022
8e3ba45
feat: update more custom parsers and unit tests and remove unnecessar…
Oct 13, 2022
8543db6
feat: update more custom parsers and unit tests
Oct 21, 2022
7b75d04
feat: update more parsers and add correct bloomberg html files
Oct 25, 2022
3dfbe07
fix: remove console statement
Oct 25, 2022
1594aea
Merge branch 'main' into move-fixtures
Oct 25, 2022
88a44d0
feat: all parsers updated and tests passing
Nov 8, 2022
fc0f434
fix: update date_published tests to account for test server time diff…
Nov 8, 2022
ac32b44
fix: cleanup remaining fixtures in folders
Nov 9, 2022
190462c
Merge branch 'main' into move-fixtures
Nov 9, 2022
9bde16b
feat: move fixtures for newest custom parsers
Nov 9, 2022
5b573bf
Merge branch 'main' into move-fixtures
Nov 10, 2022
9dec49e
feat: remove script changes
Nov 10, 2022
6334af7
fix: update dist files to account for reverting script changes
Nov 14, 2022
b2fb31a
adding .DS_Store to .gitignore
flbn Dec 5, 2022
191dc2a
adding .DS_Store to .gitignore -- 2
flbn Dec 5, 2022
8f524ab
adding .DS_Store to .gitignore -- 3 lol
flbn Dec 5, 2022
bac8319
cleaning up some tests
flbn Dec 6, 2022
5e10bcc
fix: ran build:generator command to update generate-custom-parser dis…
Dec 7, 2022
9d343c3
fix: update rollup configs to generate source maps and update source …
Dec 12, 2022
3f0fd51
fix: use underscore in place of unused error variable
Dec 12, 2022
c6c5c16
fix: remove unused fixture
Dec 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: update more parsers and add correct bloomberg html files
  • Loading branch information
Sarah Doire
Sarah Doire committed Oct 25, 2022
commit 7b75d0450180d253adf18149e873a4f9d9e9c7a5
58 changes: 29 additions & 29 deletions dist/mercury.js
Original file line number Diff line number Diff line change
Expand Up @@ -2205,14 +2205,14 @@ var WikiaExtractor = {
var LittleThingsExtractor = {
domain: 'www.littlethings.com',
title: {
selectors: ['h1.post-title']
selectors: ['h1[class*="PostHeader"]', 'h1.post-title']
},
author: {
selectors: [['meta[name="author"]', 'value']]
selectors: ['div[class^="PostHeader__ScAuthorNameSection"]', ['meta[name="author"]', 'value']]
},
content: {
selectors: [// enter content selectors
'.mainContentIntro', '.content-wrapper'],
'section[class*="PostMainArticle"]', '.mainContentIntro', '.content-wrapper'],
Comment thread
flbn marked this conversation as resolved.
Resolved
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: [],
Expand All @@ -2238,11 +2238,11 @@ var PoliticoExtractor = {
['meta[name="og:title"]', 'value']]
},
author: {
selectors: ['.story-main-content .byline .vcard']
selectors: ['.story-meta__authors .vcard', '.story-main-content .byline .vcard']
},
content: {
selectors: [// enter content selectors
'.story-main-content', '.content-group', '.story-core', '.story-text'],
['p.story-text__paragraph '], '.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: [],
Expand All @@ -2252,7 +2252,7 @@ var PoliticoExtractor = {
clean: ['figcaption']
},
date_published: {
selectors: [['.story-main-content .timestamp time[datetime]', 'datetime']]
selectors: ['.story-meta__details time[datetime]', ['.story-main-content .timestamp time[datetime]', 'datetime']]
},
lead_image_url: {
selectors: [// enter lead_image_url selectors
Expand Down Expand Up @@ -2815,9 +2815,7 @@ var WwwTheguardianComExtractor = {
selectors: ['#maincontent', '.content__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: {
'h2': 'h4'
},
transforms: {},
// Is there anything that is in the result that shouldn't be?
// The clean selectors will remove anything that matches from
// the result
Expand Down Expand Up @@ -2860,24 +2858,24 @@ var WwwBloombergComExtractor = {
selectors: [// normal articles
'.lede-headline', // /graphics/ template
'h1.article-title', // /news/ template
'h1.lede-text-only__hed']
'h1[class^="headline"]', 'h1.lede-text-only__hed']
},
author: {
selectors: [['meta[name="parsely-author"]', 'value'], '.byline-details__link', // /graphics/ template
'.bydek', // /news/ template
'.author']
'.author', 'p[class*="author"]']
},
date_published: {
selectors: [['time.published-at', 'datetime'], ['time[datetime]', 'datetime'], ['meta[name="date"]', 'value'], ['meta[name="parsely-pub-date"]', 'value']]
selectors: [['time.published-at', 'datetime'], ['time[datetime]', 'datetime'], ['meta[name="date"]', 'value'], ['meta[name="parsely-pub-date"]', 'value'], ['meta[name="parsely-pub-date"]', 'content']]
},
dek: {
selectors: []
},
lead_image_url: {
selectors: [['meta[name="og:image"]', 'value']]
selectors: [['meta[name="og:image"]', 'value'], ['meta[name="og:image"]', 'content']]
},
content: {
selectors: ['.article-body__content', // /graphics/ template
selectors: ['.article-body__content', '.body-content', // /graphics/ template
Comment thread
flbn marked this conversation as resolved.
Resolved
['section.copy-block'], // /news/ template
'.body-copy'],
// Is there anything in the content you selected that needs transformed
Expand Down Expand Up @@ -3459,21 +3457,22 @@ var WwwMentalflossComExtractor = {
var AbcnewsGoComExtractor = {
domain: 'abcnews.go.com',
title: {
selectors: ['.article-header h1']
selectors: ['div[class*="Article_main__body"] h1', '.article-header h1']
},
author: {
selectors: ['.authors'],
selectors: ['.ShareByline span:nth-child(2)', '.authors'],
clean: ['.author-overlay', '.by-text']
},
date_published: {
selectors: ['.timestamp'],
selectors: ['.ShareByline', '.timestamp'],
format: 'MMMM D, YYYY h:mm a',
timezone: 'America/New_York'
},
lead_image_url: {
selectors: [['meta[name="og:image"]', 'value']]
},
content: {
selectors: ['.article-copy'],
selectors: ['article', '.article-copy'],
Comment thread
flbn marked this conversation as resolved.
Resolved
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: {},
Expand Down Expand Up @@ -3735,19 +3734,19 @@ var UproxxComExtractor = {
var WwwEonlineComExtractor = {
domain: 'www.eonline.com',
title: {
selectors: ['h1.article__title']
selectors: ['h1.article-detail__title', 'h1.article__title']
},
author: {
selectors: ['.entry-meta__author a']
selectors: ['.article-detail__meta__author', '.entry-meta__author a']
},
date_published: {
selectors: [['meta[itemprop="datePublished"]', 'value']]
selectors: [['meta[name="article:published_time"]', 'value'], ['meta[itemprop="datePublished"]', 'value']]
},
lead_image_url: {
selectors: [['meta[name="og:image"]', 'value']]
},
content: {
selectors: [['.post-content section, .post-content div.post-content__image']],
selectors: [['.article-detail__main-content section'], ['.post-content section, .post-content div.post-content__image']],
Comment thread
flbn marked this conversation as resolved.
Resolved
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: {
Expand Down Expand Up @@ -4155,19 +4154,19 @@ var ScienceflyComExtractor = {
var HellogigglesComExtractor = {
domain: 'hellogiggles.com',
title: {
selectors: ['.title']
selectors: [['meta[name="og:title"]', 'value'], '.title']
},
author: {
selectors: ['.author-link']
selectors: ['.byline-wrapper span.author_name', '.author-link']
},
date_published: {
selectors: [['meta[name="article:published_time"]', 'value']]
selectors: [['meta[property="article:published_time"]', 'content'], ['meta[name="article:published_time"]', 'value']]
},
lead_image_url: {
selectors: [['meta[name="og:image"]', 'value']]
},
content: {
selectors: ['.entry-content'],
selectors: ['.main-content', '.entry-content'],
Comment thread
flbn marked this conversation as resolved.
Resolved
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: {},
Expand Down Expand Up @@ -4472,10 +4471,11 @@ var GothamistComExtractor = {
selectors: ['h1', '.entry-header h1']
},
author: {
selectors: ['.author']
// There are multiple article-metadata and byline-author classes, but the main article's is the 3rd child of the l-container class
selectors: ['.article-metadata:nth-child(3) .byline-author', '.author']
},
date_published: {
selectors: ['abbr', 'abbr.published'],
selectors: [['meta[name="article:published_time"]', 'value'], 'abbr', 'abbr.published'],
Comment thread
flbn marked this conversation as resolved.
Resolved
timezone: 'America/New_York'
},
dek: {
Expand All @@ -4485,7 +4485,7 @@ var GothamistComExtractor = {
selectors: [['meta[name="og:image"]', 'value']]
},
content: {
selectors: ['.entry-body'],
selectors: ['.article-body', '.entry-body'],
// Is there anything in the content you selected that needs transformed
// before it's consumable content? E.g., unusual lazy loaded images
transforms: {
Expand Down
718 changes: 686 additions & 32 deletions fixtures/abcnews.go.com.html

Large diffs are not rendered by default.

Loading