Skip to content

Commit

Permalink
fix: better parsing on product hunt
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Fernandes committed Jan 12, 2024
1 parent d353127 commit e98f66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getScrapperOptionsByUrl(url: string, title: string) {
]
};
}

if (url.includes('ycombinator.com/companies')) {
return {
header: 'YCombinator results',
Expand Down Expand Up @@ -113,7 +113,7 @@ function getScrapperOptionsByUrl(url: string, title: string) {
elementParser: [
{ title: 'Product image', query: 'img,video', type: 'image' },
{ title: 'Product name', query: '[data-test*="post-name"], a[href*="/products"] div:nth-child(1)', type: 'text' },
{ title: 'Description', query: '[class*="styles_tagline"], a[href*="/products"] div:nth-child(2)', type: 'text' },
{ title: 'Description', query: '[class*="styles_tagline"], a[href*="/products"] div:nth-child(2), [class*="_extraInfo"]', type: 'text' },
{ title: 'Up votes', query: '[data-test="vote-button"]', type: 'text' },
{ title: 'Product hunt link', query: 'a[data-test*="post-name"], a[href*="/products"]', type: 'link' },
]
Expand Down

0 comments on commit e98f66c

Please sign in to comment.