mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 21:24:55 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec50d5ced1 | ||
|
|
c713d34ba1 | ||
|
|
c4772962f4 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dailyhot-api",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"description": "An Api on Today's Hot list",
|
||||
"keywords": [
|
||||
"API",
|
||||
@@ -32,7 +32,7 @@
|
||||
"dev": "cross-env NODE_ENV=development tsx watch --no-cache src/index.ts",
|
||||
"dev:cache": "cross-env NODE_ENV=development tsx watch src/index.ts",
|
||||
"build": "tsc --project tsconfig.json",
|
||||
"start": "tsx src/index.ts"
|
||||
"start": "cross-env NODE_ENV=development tsx dist/index.js"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
||||
@@ -44,7 +44,7 @@ const getList = async (options: Options, noCache: boolean) => {
|
||||
data: list.map((v: RouterType["history"], index: number) => ({
|
||||
id: index,
|
||||
title: load(v.title).text().trim(),
|
||||
cover: v.cover ? v.pic_share : null || null,
|
||||
cover: v.cover ? v.pic_share : null,
|
||||
desc: load(v.desc).text().trim(),
|
||||
year: v.year,
|
||||
timestamp: null,
|
||||
|
||||
@@ -35,7 +35,7 @@ const getList = async (noCache: boolean) => {
|
||||
data: list.map((v: RouterType["zhihu-daily"]) => ({
|
||||
id: v.id,
|
||||
title: v.title,
|
||||
cover: v.images[0],
|
||||
cover: v.images?.[0] ?? null,
|
||||
author: v.hint,
|
||||
hot: null,
|
||||
timestamp: null,
|
||||
|
||||
Reference in New Issue
Block a user