mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix(source): producthunt items selector
This commit is contained in:
parent
08c0abeaf8
commit
8263dbff71
@ -5,7 +5,7 @@ export default defineSource(async () => {
|
|||||||
const baseURL = "https://www.producthunt.com/"
|
const baseURL = "https://www.producthunt.com/"
|
||||||
const html: any = await myFetch(baseURL)
|
const html: any = await myFetch(baseURL)
|
||||||
const $ = cheerio.load(html)
|
const $ = cheerio.load(html)
|
||||||
const $main = $("[data-test^=post-item]")
|
const $main = $("[data-test=homepage-section-0] [data-test^=post-item]")
|
||||||
const news: NewsItem[] = []
|
const news: NewsItem[] = []
|
||||||
$main.each((_, el) => {
|
$main.each((_, el) => {
|
||||||
const a = $(el).find("a").first()
|
const a = $(el).find("a").first()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user