mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix(source): migrate fastbull.cn to fastbull.com/cn
This commit is contained in:
parent
e78f724af7
commit
06d7e3b23c
@ -2,8 +2,8 @@ import * as cheerio from "cheerio"
|
|||||||
import type { NewsItem } from "@shared/types"
|
import type { NewsItem } from "@shared/types"
|
||||||
|
|
||||||
const express = defineSource(async () => {
|
const express = defineSource(async () => {
|
||||||
const baseURL = "https://www.fastbull.cn"
|
const baseURL = "https://www.fastbull.com"
|
||||||
const html: any = await myFetch(`${baseURL}/express-news`)
|
const html: any = await myFetch(`${baseURL}/cn/express-news`)
|
||||||
const $ = cheerio.load(html)
|
const $ = cheerio.load(html)
|
||||||
const $main = $(".news-list")
|
const $main = $(".news-list")
|
||||||
const news: NewsItem[] = []
|
const news: NewsItem[] = []
|
||||||
@ -26,8 +26,8 @@ const express = defineSource(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const news = defineSource(async () => {
|
const news = defineSource(async () => {
|
||||||
const baseURL = "https://www.fastbull.cn"
|
const baseURL = "https://www.fastbull.com"
|
||||||
const html: any = await myFetch(`${baseURL}/news`)
|
const html: any = await myFetch(`${baseURL}/cn/news`)
|
||||||
const $ = cheerio.load(html)
|
const $ = cheerio.load(html)
|
||||||
const $main = $(".trending_type")
|
const $main = $(".trending_type")
|
||||||
const news: NewsItem[] = []
|
const news: NewsItem[] = []
|
||||||
|
@ -21,7 +21,6 @@ const hotstock = defineSource(async () => {
|
|||||||
cookie: cookie.join("; "),
|
cookie: cookie.join("; "),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
console.log(res)
|
|
||||||
return res.data.items.filter(k => !k.ad).map(k => ({
|
return res.data.items.filter(k => !k.ad).map(k => ({
|
||||||
id: k.code,
|
id: k.code,
|
||||||
url: `https://xueqiu.com/s/${k.code}`,
|
url: `https://xueqiu.com/s/${k.code}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user