Skip to content

Commit ce3ab24

Browse files
committed
fix: Keep nested h3's in tldr.tech
1 parent d50a54d commit ce3ab24

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/extractors/custom/tldr.tech/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ export const TldrTechExtractor = {
22
domain: 'tldr.tech',
33

44
title: {
5-
selectors: [['meta[name="og:title"]', 'value'], 'title'],
5+
selectors: ['h1'],
66
},
77

88
lead_image_url: {
99
selectors: [['meta[name="twitter:image"]', 'value']],
1010
},
1111

1212
content: {
13-
selectors: ['body'],
13+
selectors: ['.content-center', 'body'],
1414

1515
transforms: {
1616
h2: $node => $node.attr('class', 'mercury-parser-keep'),

src/extractors/custom/tldr.tech/index.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ describe('TldrTechExtractor', () => {
2727
it('returns the title', async () => {
2828
const { title } = await result;
2929

30-
assert.equal(
31-
title,
32-
`OpenAI eyes $340B valuation 💰, Gemini 2.0 🤖, Javascript Temporal 👨‍💻`
33-
);
30+
assert.equal(title, `TLDR 2025-01-31`);
3431
});
3532
it('returns the lead_image_url', async () => {
3633
const { lead_image_url } = await result;

0 commit comments

Comments
 (0)