diff --git a/lib/routes/hupu/consts.ts b/lib/routes/hupu/consts.ts new file mode 100644 index 0000000000..d3c1c13651 --- /dev/null +++ b/lib/routes/hupu/consts.ts @@ -0,0 +1,46 @@ +// https://games.mobileapi.hupu.com/3/8.2.30/basketballapi/teamStandingList?offline=json&competitionLeagueType=nba&competitionType=nba&season=2025-2026&competitionStageType=REGULAR&client=EB5576BA-C415-43F7-850F-11B13E7991EB +import { result } from './response/teamStandingList.json'; + +const NBA_TEAMS = [...result.rankTypeListMap.E, ...result.rankTypeListMap.W]; + +const NBA_TEAM_NAMES: Record = { + 活塞: 'Pistons', + 尼克斯: 'Knicks', + 猛龙: 'Raptors', + 热火: 'Heat', + 凯尔特人: 'Celtics', + 魔术: 'Magic', + '76人': '76ers', + 骑士: 'Cavaliers', + 老鹰: 'Hawks', + 雄鹿: 'Bucks', + 公牛: 'Bulls', + 黄蜂: 'Hornets', + 篮网: 'Nets', + 步行者: 'Pacers', + 奇才: 'Wizards', + 雷霆: 'Thunder', + 湖人: 'Lakers', + 火箭: 'Rockets', + 马刺: 'Spurs', + 掘金: 'Nuggets', + 森林狼: 'Timberwolves', + 太阳: 'Suns', + 勇士: 'Warriors', + 灰熊: 'Grizzlies', + 开拓者: 'Trail Blazers', + 爵士: 'Jazz', + 独行侠: 'Mavericks', + 快船: 'Clippers', + 国王: 'Kings', + 鹈鹕: 'Pelicans', +}; + +export const NBA_TEAMS_ID_MAP = NBA_TEAMS.reduce( + (map, team) => { + const englishName = NBA_TEAM_NAMES[team.teamName]; + map[englishName.toLowerCase()] = team; + return map; + }, + {} as Record +); diff --git a/lib/routes/hupu/index.ts b/lib/routes/hupu/index.ts index 34a19d3d6f..2a85ded1b4 100644 --- a/lib/routes/hupu/index.ts +++ b/lib/routes/hupu/index.ts @@ -1,13 +1,11 @@ -import { load } from 'cheerio'; - import type { Data, DataItem, Route } from '@/types'; -import cache from '@/utils/cache'; import got from '@/utils/got'; -import { parseDate, parseRelativeDate } from '@/utils/parse-date'; +import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import type { HomePostItem, HupuApiResponse, NewsDataItem } from './types'; import { isHomePostItem } from './types'; +import { getEntryDetails } from './utils'; const categories = { nba: { @@ -112,85 +110,7 @@ export const route: Route = { } satisfies DataItem) ); - items = await Promise.all( - items - .filter((item) => item.link && !/subject/.test(item.link)) - .map((item) => - cache.tryGet(item.link!, async () => { - try { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = load(detailResponse.data); - - const author = content('.bbs-user-info-name, .bbs-user-wrapper-content-name-span').text(); - const pubDateString = content('.second-line-user-info span:not([class])').text(); - // Possible formats: 10:21, 45分钟前, 09-15 19:57 - const currentYear = new Date().getFullYear(); - const currentDate = new Date(); - const monthDayTimePattern = /^(\d{2})-(\d{2}) (\d{2}):(\d{2})$/; - const timeOnlyPattern = /^(\d{1,2}):(\d{2})$/; - let processedDateString = pubDateString; - - if (monthDayTimePattern.test(pubDateString)) { - processedDateString = `${currentYear}-${pubDateString}`; - } else if (timeOnlyPattern.test(pubDateString)) { - const month = String(currentDate.getMonth() + 1).padStart(2, '0'); - const day = String(currentDate.getDate()).padStart(2, '0'); - processedDateString = `${currentYear}-${month}-${day} ${pubDateString}`; - } - - const pubDate = [item.pubDate, timezone(parseDate(processedDateString), +8), timezone(parseRelativeDate(pubDateString), +8)].find((d) => d instanceof Date && !Number.isNaN(d.getTime())); - const categories = content('.basketballTobbs_tag > a, .tag-player-team') - .toArray() - .map((c) => content(c).text()) - .filter(Boolean); - - content('.basketballTobbs_tag').remove(); - content('.hupu-img').each(function () { - const imgSrc = content(this).attr('data-gif') || content(this).attr('data-origin') || content(this).attr('src'); - content(this).parent().html(``); - }); - - // 分别获取内容元素 - const descriptionParts: string[] = []; - - // 获取主要内容 - const mainContent = content('#bbs-thread-content, .bbs-content-font').html(); - if (mainContent) { - descriptionParts.push(mainContent); - } - - // 单独处理视频部分 - const videoWrapper = content('.header-video-wrapper'); - if (videoWrapper.length > 0) { - const videoElement = videoWrapper.find('video'); - if (videoElement.length > 0) { - const videoHtml = videoElement.prop('outerHTML'); - if (videoHtml) { - descriptionParts.push(videoHtml); - } - } - } - - const description = descriptionParts.length > 0 ? descriptionParts.join('') : undefined; - - return { - ...item, - author, - category: categories.length > 0 ? categories : item.category, - description, - pubDate, - }; - } catch { - // no-empty - return item; - } - }) - ) - ); + items = await Promise.all(items.filter((item) => item.link && !/subject/.test(item.link)).map((item) => getEntryDetails(item))); return { title: `虎扑 - ${categories[category].title}`, diff --git a/lib/routes/hupu/news.ts b/lib/routes/hupu/news.ts new file mode 100644 index 0000000000..633cbeea08 --- /dev/null +++ b/lib/routes/hupu/news.ts @@ -0,0 +1,44 @@ +import type { Data, DataItem, Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { NBA_TEAMS_ID_MAP } from './consts'; +import { getEntryDetails } from './utils'; + +export const route: Route = { + path: ['/news/:team'], + name: '队伍新闻', + url: 'm.hupu.com', + maintainers: ['hyoban'], + example: '/news/Spurs', + parameters: { + team: { + description: '全小写的英文队名,例如:spurs, lakers, warriors 等等', + }, + }, + categories: ['bbs'], + handler: async (ctx): Promise => { + const team = NBA_TEAMS_ID_MAP[ctx.req.param('team')]; + const teamId = team?.teamId; + if (!teamId) { + throw new Error('Invalid team name'); + } + const data = await ofetch(`https://games.mobileapi.hupu.com/3/7.5.60/basketballapi/news/v2/teamNewsById?cateGoryCode=basketball&clientId=93977196&newsId=0&teamId=${teamId}`); + + let items: DataItem[] = data.result.map((item) => ({ + title: item.title, + guid: item.tid, + link: `https://m.hupu.com/bbs/${item.tid}`, + pubDate: timezone(parseDate(item.publishTime), +8), + })); + + items = await Promise.all(items.map((item) => getEntryDetails(item))); + + return { + title: `虎扑 - ${team.teamName} 新闻`, + link: 'https://m.hupu.com', + item: items, + } as Data; + }, +}; diff --git a/lib/routes/hupu/response/teamStandingList.json b/lib/routes/hupu/response/teamStandingList.json new file mode 100644 index 0000000000..82f52772bd --- /dev/null +++ b/lib/routes/hupu/response/teamStandingList.json @@ -0,0 +1,1541 @@ +{ + "errorCode": "", + "errorMsg": "", + "result": { + "competitionSeasonStageType": { + "competitionSeasonType": { + "competitionType": { + "leagueTypeName": "NBA", + "competitionTypeName": "NBA" + }, + "season": "2025-2026" + }, + "competitionStageTypeName": "REGULAR" + }, + "rankTypeListMap": { + "E": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 1, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501290", + "teamName": "活塞", + "teamShortName": "活塞", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/6A7BB8949E29F7F8ACC490BF3DC54871_1657174191189.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501290", + "won": 17, + "lost": 5, + "divWins": 4, + "divLosses": 3, + "confWins": 13, + "confLosses": 5, + "winRate": "77.3%", + "divGb": "0.0", + "homeWins": 8, + "homeLosses": 2, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "0.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 2, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501273", + "teamName": "尼克斯", + "teamShortName": "尼克斯", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/44086A23B5EA9ED18D57141ED11FEC73_1657174040467.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501273", + "won": 14, + "lost": 7, + "divWins": 4, + "divLosses": 1, + "confWins": 11, + "confLosses": 7, + "winRate": "66.7%", + "divGb": "0.0", + "homeWins": 11, + "homeLosses": 1, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "2.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 3, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501298", + "teamName": "猛龙", + "teamShortName": "猛龙", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/2C4E5806829643C2BBAEA95E8639E9DA_1657174236162.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501298", + "won": 15, + "lost": 8, + "divWins": 3, + "divLosses": 2, + "confWins": 13, + "confLosses": 4, + "winRate": "65.2%", + "divGb": "0.0", + "homeWins": 8, + "homeLosses": 3, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "2.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 4, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501267", + "teamName": "热火", + "teamShortName": "热火", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/FC92B35C74B6870C871DD2DCB95B8A86_1657174030720.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501267", + "won": 14, + "lost": 8, + "divWins": 2, + "divLosses": 1, + "confWins": 8, + "confLosses": 4, + "winRate": "63.6%", + "divGb": "0.0", + "homeWins": 10, + "homeLosses": 2, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "3.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 5, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501263", + "teamName": "凯尔特人", + "teamShortName": "凯尔特人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/71D849840DAA77FFF62B68E1FC195E3B_1657174014644.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501263", + "won": 13, + "lost": 9, + "divWins": 3, + "divLosses": 4, + "confWins": 10, + "confLosses": 6, + "winRate": "59.1%", + "divGb": "1.5", + "homeWins": 7, + "homeLosses": 4, + "strk": "3", + "playoffsCertification": 0, + "integral": null, + "gb": "4.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 6, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501279", + "teamName": "魔术", + "teamShortName": "魔术", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/93243F473635E01157407E937901BB29_1657174048221.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501279", + "won": 13, + "lost": 9, + "divWins": 3, + "divLosses": 2, + "confWins": 10, + "confLosses": 7, + "winRate": "59.1%", + "divGb": "1.0", + "homeWins": 8, + "homeLosses": 4, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "4.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 7, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501281", + "teamName": "76人", + "teamShortName": "76人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/12B3514277DE16CA223C87F52B3E59B0_1657173522873.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501281", + "won": 12, + "lost": 9, + "divWins": 5, + "divLosses": 2, + "confWins": 10, + "confLosses": 9, + "winRate": "57.1%", + "divGb": "2.0", + "homeWins": 7, + "homeLosses": 6, + "strk": "2", + "playoffsCertification": 0, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 8, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501288", + "teamName": "骑士", + "teamShortName": "骑士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/59FDBC2FC2EF63E464556ABF140D2B28_1657174182897.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501288", + "won": 13, + "lost": 10, + "divWins": 6, + "divLosses": 0, + "confWins": 11, + "confLosses": 8, + "winRate": "56.5%", + "divGb": "4.5", + "homeWins": 8, + "homeLosses": 5, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 9, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501284", + "teamName": "老鹰", + "teamShortName": "老鹰", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/51AA3EE81B8EDCE8EB8C81E5D86F099C_1657175154482.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501284", + "won": 13, + "lost": 10, + "divWins": 3, + "divLosses": 1, + "confWins": 7, + "confLosses": 7, + "winRate": "56.5%", + "divGb": "1.5", + "homeWins": 4, + "homeLosses": 5, + "strk": "-2", + "playoffsCertification": 0, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 10, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501294", + "teamName": "雄鹿", + "teamShortName": "雄鹿", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/83283E33B2707E04FA29BDEC215D7505_1657174217476.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501294", + "won": 10, + "lost": 13, + "divWins": 3, + "divLosses": 3, + "confWins": 8, + "confLosses": 9, + "winRate": "43.5%", + "divGb": "7.5", + "homeWins": 7, + "homeLosses": 6, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "7.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 11, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501286", + "teamName": "公牛", + "teamShortName": "公牛", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0A52DFC33FBDC999CDB56544F9CB313B_1657174167443.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501286", + "won": 9, + "lost": 12, + "divWins": 1, + "divLosses": 4, + "confWins": 6, + "confLosses": 9, + "winRate": "42.9%", + "divGb": "7.5", + "homeWins": 6, + "homeLosses": 3, + "strk": "-5", + "playoffsCertification": 0, + "integral": null, + "gb": "7.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 12, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501334", + "teamName": "黄蜂", + "teamShortName": "黄蜂", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/6A38E35A125B4DF0D0457690887F433B_1657174260380.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501334", + "won": 6, + "lost": 16, + "divWins": 1, + "divLosses": 4, + "confWins": 5, + "confLosses": 11, + "winRate": "27.3%", + "divGb": "8.0", + "homeWins": 5, + "homeLosses": 6, + "strk": "-2", + "playoffsCertification": 0, + "integral": null, + "gb": "11.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 13, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501336", + "teamName": "篮网", + "teamShortName": "篮网", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/5D461E37576BA053CB96D299B29E2BFD_1657174252146.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501336", + "won": 5, + "lost": 17, + "divWins": 1, + "divLosses": 7, + "confWins": 5, + "confLosses": 13, + "winRate": "22.7%", + "divGb": "9.5", + "homeWins": 1, + "homeLosses": 10, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "12.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 14, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501292", + "teamName": "步行者", + "teamShortName": "步行者", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/32CEB6FF938C838CB896E931ACF5D871_1657174208634.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501292", + "won": 4, + "lost": 18, + "divWins": 1, + "divLosses": 5, + "confWins": 3, + "confLosses": 9, + "winRate": "18.2%", + "divGb": "13.0", + "homeWins": 4, + "homeLosses": 8, + "strk": "-2", + "playoffsCertification": 0, + "integral": null, + "gb": "13.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "E", + "rank": 15, + "rankTypeDesc": "东部排行", + "teamId": "1901000000501283", + "teamName": "奇才", + "teamShortName": "奇才", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/977768CE19436649A4A103804C7BA6FF_1657174059344.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501283", + "won": 3, + "lost": 18, + "divWins": 1, + "divLosses": 2, + "confWins": 2, + "confLosses": 14, + "winRate": "14.3%", + "divGb": "10.5", + "homeWins": 2, + "homeLosses": 7, + "strk": "-2", + "playoffsCertification": 0, + "integral": null, + "gb": "13.5" + } + ], + "W": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 1, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501329", + "teamName": "雷霆", + "teamShortName": "雷霆", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/55E682ADE2434D37F470CCEF3D2EF212_1657173583291.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501329", + "won": 21, + "lost": 1, + "divWins": 4, + "divLosses": 1, + "confWins": 17, + "confLosses": 1, + "winRate": "95.5%", + "divGb": "0.0", + "homeWins": 10, + "homeLosses": 0, + "strk": "13", + "playoffsCertification": 0, + "integral": null, + "gb": "0.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 2, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501323", + "teamName": "湖人", + "teamShortName": "湖人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/708BC902E00BBD439A1C892A0D58F381_1657174320036.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501323", + "won": 16, + "lost": 5, + "divWins": 2, + "divLosses": 2, + "confWins": 12, + "confLosses": 4, + "winRate": "76.2%", + "divGb": "0.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 3, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501311", + "teamName": "火箭", + "teamShortName": "火箭", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/2F9056A916907A1FCF3C8DB98292B600_1657174365689.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501311", + "won": 14, + "lost": 5, + "divWins": 2, + "divLosses": 1, + "confWins": 7, + "confLosses": 4, + "winRate": "73.7%", + "divGb": "0.0", + "homeWins": 6, + "homeLosses": 2, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 4, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501317", + "teamName": "马刺", + "teamShortName": "马刺", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/4805E990F70CA26727E538FD0208ADAC_1657686884877.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501317", + "won": 15, + "lost": 6, + "divWins": 6, + "divLosses": 0, + "confWins": 9, + "confLosses": 6, + "winRate": "71.4%", + "divGb": "0.0", + "homeWins": 9, + "homeLosses": 2, + "strk": "2", + "playoffsCertification": 0, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 5, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501301", + "teamName": "掘金", + "teamShortName": "掘金", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/BF833EF7FCA7FA7103467F0A9FB98DD7_1657194370775.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501301", + "won": 15, + "lost": 6, + "divWins": 2, + "divLosses": 1, + "confWins": 12, + "confLosses": 5, + "winRate": "71.4%", + "divGb": "5.5", + "homeWins": 6, + "homeLosses": 4, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 6, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501315", + "teamName": "森林狼", + "teamShortName": "森林狼", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/DD0D5B42D50F2816B71D4C87059A1E7D_1657174355703.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501315", + "won": 14, + "lost": 8, + "divWins": 3, + "divLosses": 3, + "confWins": 9, + "confLosses": 7, + "winRate": "63.6%", + "divGb": "7.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "4", + "playoffsCertification": 0, + "integral": null, + "gb": "7.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 7, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501327", + "teamName": "太阳", + "teamShortName": "太阳", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0318B0B694F80E0F873B0A4714470D58_1657174298893.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501327", + "won": 13, + "lost": 9, + "divWins": 5, + "divLosses": 2, + "confWins": 12, + "confLosses": 8, + "winRate": "59.1%", + "divGb": "3.5", + "homeWins": 8, + "homeLosses": 4, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "8.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 8, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501331", + "teamName": "勇士", + "teamShortName": "勇士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/D48624DA509B5BBC4B447DCBDC496B71_1698746059833.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501331", + "won": 11, + "lost": 12, + "divWins": 3, + "divLosses": 1, + "confWins": 10, + "confLosses": 7, + "winRate": "47.8%", + "divGb": "6.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "-2", + "playoffsCertification": 0, + "integral": null, + "gb": "10.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 9, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501313", + "teamName": "灰熊", + "teamShortName": "灰熊", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/4702CB9A44715817306465D157774A72_1657686863936.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501313", + "won": 9, + "lost": 13, + "divWins": 4, + "divLosses": 3, + "confWins": 8, + "confLosses": 7, + "winRate": "40.9%", + "divGb": "6.5", + "homeWins": 4, + "homeLosses": 6, + "strk": "-1", + "playoffsCertification": 0, + "integral": null, + "gb": "12.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 10, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501325", + "teamName": "开拓者", + "teamShortName": "开拓者", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/EFDBB64E572063C35921A7270445F4E9_1657686875832.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501325", + "won": 9, + "lost": 13, + "divWins": 3, + "divLosses": 3, + "confWins": 7, + "confLosses": 9, + "winRate": "40.9%", + "divGb": "12.0", + "homeWins": 3, + "homeLosses": 6, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "12.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 11, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501320", + "teamName": "爵士", + "teamShortName": "爵士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/9CA4183AF78F085879786BF8BE23E1E3_1657173460899.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501320", + "won": 8, + "lost": 13, + "divWins": 0, + "divLosses": 4, + "confWins": 4, + "confLosses": 10, + "winRate": "38.1%", + "divGb": "12.5", + "homeWins": 6, + "homeLosses": 6, + "strk": "2", + "playoffsCertification": 0, + "integral": null, + "gb": "12.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 12, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501300", + "teamName": "独行侠", + "teamShortName": "独行侠", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/D7D19A2B49E6DBE3772809B9AFDC4DD0_1657690785182.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501300", + "won": 8, + "lost": 15, + "divWins": 1, + "divLosses": 5, + "confWins": 4, + "confLosses": 10, + "winRate": "34.8%", + "divGb": "8.0", + "homeWins": 5, + "homeLosses": 9, + "strk": "3", + "playoffsCertification": 0, + "integral": null, + "gb": "13.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 13, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501333", + "teamName": "快船", + "teamShortName": "快船", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/455AEC22C5CCAF97E9176F7C3183272F_1744516408048.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501333", + "won": 6, + "lost": 16, + "divWins": 1, + "divLosses": 4, + "confWins": 4, + "confLosses": 9, + "winRate": "27.3%", + "divGb": "10.5", + "homeWins": 3, + "homeLosses": 7, + "strk": "1", + "playoffsCertification": 0, + "integral": null, + "gb": "15.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 14, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501321", + "teamName": "国王", + "teamShortName": "国王", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/CD470E4CE6F96B896B65125FB9482F4B_1657174333052.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501321", + "won": 5, + "lost": 17, + "divWins": 1, + "divLosses": 3, + "confWins": 4, + "confLosses": 15, + "winRate": "22.7%", + "divGb": "11.5", + "homeWins": 3, + "homeLosses": 7, + "strk": "-4", + "playoffsCertification": 0, + "integral": null, + "gb": "16.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "W", + "rank": 15, + "rankTypeDesc": "西部排行", + "teamId": "1901000000501296", + "teamName": "鹈鹕", + "teamShortName": "鹈鹕", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0595E22C1AF2A5569283C44AF2018A99_1657174225999.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501296", + "won": 3, + "lost": 20, + "divWins": 1, + "divLosses": 5, + "confWins": 1, + "confLosses": 18, + "winRate": "13.0%", + "divGb": "13.0", + "homeWins": 2, + "homeLosses": 11, + "strk": "-5", + "playoffsCertification": 0, + "integral": null, + "gb": "18.5" + } + ] + }, + "divRankTypeListMap": { + "Atlantic": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Atlantic", + "rank": 1, + "rankTypeDesc": "大西洋分区", + "teamId": "1901000000501273", + "teamName": "尼克斯", + "teamShortName": "尼克斯", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/44086A23B5EA9ED18D57141ED11FEC73_1657174040467.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501273", + "won": 14, + "lost": 7, + "divWins": 4, + "divLosses": 1, + "confWins": 11, + "confLosses": 7, + "winRate": "66.7%", + "divGb": "0.0", + "homeWins": 11, + "homeLosses": 1, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "2.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Atlantic", + "rank": 2, + "rankTypeDesc": "大西洋分区", + "teamId": "1901000000501298", + "teamName": "猛龙", + "teamShortName": "猛龙", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/2C4E5806829643C2BBAEA95E8639E9DA_1657174236162.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501298", + "won": 15, + "lost": 8, + "divWins": 3, + "divLosses": 2, + "confWins": 13, + "confLosses": 4, + "winRate": "65.2%", + "divGb": "0.0", + "homeWins": 8, + "homeLosses": 3, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "2.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Atlantic", + "rank": 3, + "rankTypeDesc": "大西洋分区", + "teamId": "1901000000501263", + "teamName": "凯尔特人", + "teamShortName": "凯尔特人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/71D849840DAA77FFF62B68E1FC195E3B_1657174014644.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501263", + "won": 13, + "lost": 9, + "divWins": 3, + "divLosses": 4, + "confWins": 10, + "confLosses": 6, + "winRate": "59.1%", + "divGb": "1.5", + "homeWins": 7, + "homeLosses": 4, + "strk": "3", + "playoffsCertification": null, + "integral": null, + "gb": "4.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Atlantic", + "rank": 4, + "rankTypeDesc": "大西洋分区", + "teamId": "1901000000501281", + "teamName": "76人", + "teamShortName": "76人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/12B3514277DE16CA223C87F52B3E59B0_1657173522873.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501281", + "won": 12, + "lost": 9, + "divWins": 5, + "divLosses": 2, + "confWins": 10, + "confLosses": 9, + "winRate": "57.1%", + "divGb": "2.0", + "homeWins": 7, + "homeLosses": 6, + "strk": "2", + "playoffsCertification": null, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Atlantic", + "rank": 5, + "rankTypeDesc": "大西洋分区", + "teamId": "1901000000501336", + "teamName": "篮网", + "teamShortName": "篮网", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/5D461E37576BA053CB96D299B29E2BFD_1657174252146.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501336", + "won": 5, + "lost": 17, + "divWins": 1, + "divLosses": 7, + "confWins": 5, + "confLosses": 13, + "winRate": "22.7%", + "divGb": "9.5", + "homeWins": 1, + "homeLosses": 10, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "12.0" + } + ], + "Central": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Central", + "rank": 1, + "rankTypeDesc": "中部分区", + "teamId": "1901000000501290", + "teamName": "活塞", + "teamShortName": "活塞", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/6A7BB8949E29F7F8ACC490BF3DC54871_1657174191189.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501290", + "won": 17, + "lost": 5, + "divWins": 4, + "divLosses": 3, + "confWins": 13, + "confLosses": 5, + "winRate": "77.3%", + "divGb": "0.0", + "homeWins": 8, + "homeLosses": 2, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "0.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Central", + "rank": 2, + "rankTypeDesc": "中部分区", + "teamId": "1901000000501288", + "teamName": "骑士", + "teamShortName": "骑士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/59FDBC2FC2EF63E464556ABF140D2B28_1657174182897.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501288", + "won": 13, + "lost": 10, + "divWins": 6, + "divLosses": 0, + "confWins": 11, + "confLosses": 8, + "winRate": "56.5%", + "divGb": "4.5", + "homeWins": 8, + "homeLosses": 5, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Central", + "rank": 3, + "rankTypeDesc": "中部分区", + "teamId": "1901000000501294", + "teamName": "雄鹿", + "teamShortName": "雄鹿", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/83283E33B2707E04FA29BDEC215D7505_1657174217476.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501294", + "won": 10, + "lost": 13, + "divWins": 3, + "divLosses": 3, + "confWins": 8, + "confLosses": 9, + "winRate": "43.5%", + "divGb": "7.5", + "homeWins": 7, + "homeLosses": 6, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "7.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Central", + "rank": 4, + "rankTypeDesc": "中部分区", + "teamId": "1901000000501286", + "teamName": "公牛", + "teamShortName": "公牛", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0A52DFC33FBDC999CDB56544F9CB313B_1657174167443.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501286", + "won": 9, + "lost": 12, + "divWins": 1, + "divLosses": 4, + "confWins": 6, + "confLosses": 9, + "winRate": "42.9%", + "divGb": "7.5", + "homeWins": 6, + "homeLosses": 3, + "strk": "-5", + "playoffsCertification": null, + "integral": null, + "gb": "7.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Central", + "rank": 5, + "rankTypeDesc": "中部分区", + "teamId": "1901000000501292", + "teamName": "步行者", + "teamShortName": "步行者", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/32CEB6FF938C838CB896E931ACF5D871_1657174208634.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501292", + "won": 4, + "lost": 18, + "divWins": 1, + "divLosses": 5, + "confWins": 3, + "confLosses": 9, + "winRate": "18.2%", + "divGb": "13.0", + "homeWins": 4, + "homeLosses": 8, + "strk": "-2", + "playoffsCertification": null, + "integral": null, + "gb": "13.0" + } + ], + "Southeast": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southeast", + "rank": 1, + "rankTypeDesc": "东南分区", + "teamId": "1901000000501267", + "teamName": "热火", + "teamShortName": "热火", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/FC92B35C74B6870C871DD2DCB95B8A86_1657174030720.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501267", + "won": 14, + "lost": 8, + "divWins": 2, + "divLosses": 1, + "confWins": 8, + "confLosses": 4, + "winRate": "63.6%", + "divGb": "0.0", + "homeWins": 10, + "homeLosses": 2, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "3.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southeast", + "rank": 2, + "rankTypeDesc": "东南分区", + "teamId": "1901000000501279", + "teamName": "魔术", + "teamShortName": "魔术", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/93243F473635E01157407E937901BB29_1657174048221.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501279", + "won": 13, + "lost": 9, + "divWins": 3, + "divLosses": 2, + "confWins": 10, + "confLosses": 7, + "winRate": "59.1%", + "divGb": "1.0", + "homeWins": 8, + "homeLosses": 4, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "4.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southeast", + "rank": 3, + "rankTypeDesc": "东南分区", + "teamId": "1901000000501284", + "teamName": "老鹰", + "teamShortName": "老鹰", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/51AA3EE81B8EDCE8EB8C81E5D86F099C_1657175154482.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501284", + "won": 13, + "lost": 10, + "divWins": 3, + "divLosses": 1, + "confWins": 7, + "confLosses": 7, + "winRate": "56.5%", + "divGb": "1.5", + "homeWins": 4, + "homeLosses": 5, + "strk": "-2", + "playoffsCertification": null, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southeast", + "rank": 4, + "rankTypeDesc": "东南分区", + "teamId": "1901000000501334", + "teamName": "黄蜂", + "teamShortName": "黄蜂", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/6A38E35A125B4DF0D0457690887F433B_1657174260380.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501334", + "won": 6, + "lost": 16, + "divWins": 1, + "divLosses": 4, + "confWins": 5, + "confLosses": 11, + "winRate": "27.3%", + "divGb": "8.0", + "homeWins": 5, + "homeLosses": 6, + "strk": "-2", + "playoffsCertification": null, + "integral": null, + "gb": "11.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southeast", + "rank": 5, + "rankTypeDesc": "东南分区", + "teamId": "1901000000501283", + "teamName": "奇才", + "teamShortName": "奇才", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/977768CE19436649A4A103804C7BA6FF_1657174059344.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501283", + "won": 3, + "lost": 18, + "divWins": 1, + "divLosses": 2, + "confWins": 2, + "confLosses": 14, + "winRate": "14.3%", + "divGb": "10.5", + "homeWins": 2, + "homeLosses": 7, + "strk": "-2", + "playoffsCertification": null, + "integral": null, + "gb": "13.5" + } + ], + "Northwest": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Northwest", + "rank": 1, + "rankTypeDesc": "西北分区", + "teamId": "1901000000501329", + "teamName": "雷霆", + "teamShortName": "雷霆", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/55E682ADE2434D37F470CCEF3D2EF212_1657173583291.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501329", + "won": 21, + "lost": 1, + "divWins": 4, + "divLosses": 1, + "confWins": 17, + "confLosses": 1, + "winRate": "95.5%", + "divGb": "0.0", + "homeWins": 10, + "homeLosses": 0, + "strk": "13", + "playoffsCertification": null, + "integral": null, + "gb": "0.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Northwest", + "rank": 2, + "rankTypeDesc": "西北分区", + "teamId": "1901000000501301", + "teamName": "掘金", + "teamShortName": "掘金", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/BF833EF7FCA7FA7103467F0A9FB98DD7_1657194370775.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501301", + "won": 15, + "lost": 6, + "divWins": 2, + "divLosses": 1, + "confWins": 12, + "confLosses": 5, + "winRate": "71.4%", + "divGb": "5.5", + "homeWins": 6, + "homeLosses": 4, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Northwest", + "rank": 3, + "rankTypeDesc": "西北分区", + "teamId": "1901000000501315", + "teamName": "森林狼", + "teamShortName": "森林狼", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/DD0D5B42D50F2816B71D4C87059A1E7D_1657174355703.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501315", + "won": 14, + "lost": 8, + "divWins": 3, + "divLosses": 3, + "confWins": 9, + "confLosses": 7, + "winRate": "63.6%", + "divGb": "7.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "4", + "playoffsCertification": null, + "integral": null, + "gb": "7.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Northwest", + "rank": 4, + "rankTypeDesc": "西北分区", + "teamId": "1901000000501325", + "teamName": "开拓者", + "teamShortName": "开拓者", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/EFDBB64E572063C35921A7270445F4E9_1657686875832.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501325", + "won": 9, + "lost": 13, + "divWins": 3, + "divLosses": 3, + "confWins": 7, + "confLosses": 9, + "winRate": "40.9%", + "divGb": "12.0", + "homeWins": 3, + "homeLosses": 6, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "12.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Northwest", + "rank": 5, + "rankTypeDesc": "西北分区", + "teamId": "1901000000501320", + "teamName": "爵士", + "teamShortName": "爵士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/9CA4183AF78F085879786BF8BE23E1E3_1657173460899.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501320", + "won": 8, + "lost": 13, + "divWins": 0, + "divLosses": 4, + "confWins": 4, + "confLosses": 10, + "winRate": "38.1%", + "divGb": "12.5", + "homeWins": 6, + "homeLosses": 6, + "strk": "2", + "playoffsCertification": null, + "integral": null, + "gb": "12.5" + } + ], + "Pacific": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Pacific", + "rank": 1, + "rankTypeDesc": "太平洋分区", + "teamId": "1901000000501323", + "teamName": "湖人", + "teamShortName": "湖人", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/708BC902E00BBD439A1C892A0D58F381_1657174320036.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501323", + "won": 16, + "lost": 5, + "divWins": 2, + "divLosses": 2, + "confWins": 12, + "confLosses": 4, + "winRate": "76.2%", + "divGb": "0.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "4.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Pacific", + "rank": 2, + "rankTypeDesc": "太平洋分区", + "teamId": "1901000000501327", + "teamName": "太阳", + "teamShortName": "太阳", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0318B0B694F80E0F873B0A4714470D58_1657174298893.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501327", + "won": 13, + "lost": 9, + "divWins": 5, + "divLosses": 2, + "confWins": 12, + "confLosses": 8, + "winRate": "59.1%", + "divGb": "3.5", + "homeWins": 8, + "homeLosses": 4, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "8.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Pacific", + "rank": 3, + "rankTypeDesc": "太平洋分区", + "teamId": "1901000000501331", + "teamName": "勇士", + "teamShortName": "勇士", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/D48624DA509B5BBC4B447DCBDC496B71_1698746059833.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501331", + "won": 11, + "lost": 12, + "divWins": 3, + "divLosses": 1, + "confWins": 10, + "confLosses": 7, + "winRate": "47.8%", + "divGb": "6.0", + "homeWins": 7, + "homeLosses": 3, + "strk": "-2", + "playoffsCertification": null, + "integral": null, + "gb": "10.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Pacific", + "rank": 4, + "rankTypeDesc": "太平洋分区", + "teamId": "1901000000501333", + "teamName": "快船", + "teamShortName": "快船", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/455AEC22C5CCAF97E9176F7C3183272F_1744516408048.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501333", + "won": 6, + "lost": 16, + "divWins": 1, + "divLosses": 4, + "confWins": 4, + "confLosses": 9, + "winRate": "27.3%", + "divGb": "10.5", + "homeWins": 3, + "homeLosses": 7, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "15.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Pacific", + "rank": 5, + "rankTypeDesc": "太平洋分区", + "teamId": "1901000000501321", + "teamName": "国王", + "teamShortName": "国王", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/CD470E4CE6F96B896B65125FB9482F4B_1657174333052.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501321", + "won": 5, + "lost": 17, + "divWins": 1, + "divLosses": 3, + "confWins": 4, + "confLosses": 15, + "winRate": "22.7%", + "divGb": "11.5", + "homeWins": 3, + "homeLosses": 7, + "strk": "-4", + "playoffsCertification": null, + "integral": null, + "gb": "16.0" + } + ], + "Southwest": [ + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southwest", + "rank": 1, + "rankTypeDesc": "西南分区", + "teamId": "1901000000501311", + "teamName": "火箭", + "teamShortName": "火箭", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/2F9056A916907A1FCF3C8DB98292B600_1657174365689.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501311", + "won": 14, + "lost": 5, + "divWins": 2, + "divLosses": 1, + "confWins": 7, + "confLosses": 4, + "winRate": "73.7%", + "divGb": "0.0", + "homeWins": 6, + "homeLosses": 2, + "strk": "1", + "playoffsCertification": null, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southwest", + "rank": 2, + "rankTypeDesc": "西南分区", + "teamId": "1901000000501317", + "teamName": "马刺", + "teamShortName": "马刺", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/4805E990F70CA26727E538FD0208ADAC_1657686884877.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501317", + "won": 15, + "lost": 6, + "divWins": 6, + "divLosses": 0, + "confWins": 9, + "confLosses": 6, + "winRate": "71.4%", + "divGb": "0.0", + "homeWins": 9, + "homeLosses": 2, + "strk": "2", + "playoffsCertification": null, + "integral": null, + "gb": "5.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southwest", + "rank": 3, + "rankTypeDesc": "西南分区", + "teamId": "1901000000501313", + "teamName": "灰熊", + "teamShortName": "灰熊", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/4702CB9A44715817306465D157774A72_1657686863936.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501313", + "won": 9, + "lost": 13, + "divWins": 4, + "divLosses": 3, + "confWins": 8, + "confLosses": 7, + "winRate": "40.9%", + "divGb": "6.5", + "homeWins": 4, + "homeLosses": 6, + "strk": "-1", + "playoffsCertification": null, + "integral": null, + "gb": "12.0" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southwest", + "rank": 4, + "rankTypeDesc": "西南分区", + "teamId": "1901000000501300", + "teamName": "独行侠", + "teamShortName": "独行侠", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/D7D19A2B49E6DBE3772809B9AFDC4DD0_1657690785182.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501300", + "won": 8, + "lost": 15, + "divWins": 1, + "divLosses": 5, + "confWins": 4, + "confLosses": 10, + "winRate": "34.8%", + "divGb": "8.0", + "homeWins": 5, + "homeLosses": 9, + "strk": "3", + "playoffsCertification": null, + "integral": null, + "gb": "13.5" + }, + { + "competitionStageEnum": "NBA_REGULAR", + "rankType": "Southwest", + "rank": 5, + "rankTypeDesc": "西南分区", + "teamId": "1901000000501296", + "teamName": "鹈鹕", + "teamShortName": "鹈鹕", + "logoLink": "http://i11.hoopchina.com.cn/all-backend/0595E22C1AF2A5569283C44AF2018A99_1657174225999.png", + "schema": "huputiyu://webview/openencodeurl?fullscreen=1&url=https%3A%2F%2Foffline-download.hupu.com%2Fonline%2Fprod%2F330003%2Fteam-entry.html%3FleagueType%3DNBA%26tid%3D1901000000501296", + "won": 3, + "lost": 20, + "divWins": 1, + "divLosses": 5, + "confWins": 1, + "confLosses": 18, + "winRate": "13.0%", + "divGb": "13.0", + "homeWins": 2, + "homeLosses": 11, + "strk": "-5", + "playoffsCertification": null, + "integral": null, + "gb": "18.5" + } + ] + } + }, + "success": true, + "traceId": "25120522033451106264-89127:basketball-all-api-20251202141057-67b899c-6d588d9644-69grz", + "hostName": "basketball-all-api-20251202141057-67b899c-6d588d9644-69grz", + "msg": "", + "status": 200 +} diff --git a/lib/routes/hupu/utils.ts b/lib/routes/hupu/utils.ts new file mode 100644 index 0000000000..9f9e72df40 --- /dev/null +++ b/lib/routes/hupu/utils.ts @@ -0,0 +1,86 @@ +import { load } from 'cheerio'; + +import type { DataItem } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate, parseRelativeDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export function getEntryDetails(item: DataItem): Promise { + if (!item.link) { + return Promise.resolve(item); + } + return cache.tryGet(item.link!, async () => { + try { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + + const content = load(detailResponse.data); + + const author = content('.bbs-user-info-name, .bbs-user-wrapper-content-name-span').text(); + const pubDateString = content('.second-line-user-info span:not([class])').text(); + // Possible formats: 10:21, 45分钟前, 09-15 19:57 + const currentYear = new Date().getFullYear(); + const currentDate = new Date(); + const monthDayTimePattern = /^(\d{2})-(\d{2}) (\d{2}):(\d{2})$/; + const timeOnlyPattern = /^(\d{1,2}):(\d{2})$/; + let processedDateString = pubDateString; + + if (monthDayTimePattern.test(pubDateString)) { + processedDateString = `${currentYear}-${pubDateString}`; + } else if (timeOnlyPattern.test(pubDateString)) { + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); + const day = String(currentDate.getDate()).padStart(2, '0'); + processedDateString = `${currentYear}-${month}-${day} ${pubDateString}`; + } + + const pubDate = [item.pubDate, timezone(parseDate(processedDateString), +8), timezone(parseRelativeDate(pubDateString), +8)].find((d) => d instanceof Date && !Number.isNaN(d.getTime())); + const categories = content('.basketballTobbs_tag > a, .tag-player-team') + .toArray() + .map((c) => content(c).text()) + .filter(Boolean); + + content('.basketballTobbs_tag').remove(); + content('.hupu-img').each(function () { + const imgSrc = content(this).attr('data-gif') || content(this).attr('data-origin') || content(this).attr('src'); + content(this).parent().html(``); + }); + + // 分别获取内容元素 + const descriptionParts: string[] = []; + + // 获取主要内容 + const mainContent = content('#bbs-thread-content, .bbs-content-font').html(); + if (mainContent) { + descriptionParts.push(mainContent); + } + + // 单独处理视频部分 + const videoWrapper = content('.header-video-wrapper'); + if (videoWrapper.length > 0) { + const videoElement = videoWrapper.find('video'); + if (videoElement.length > 0) { + const videoHtml = videoElement.prop('outerHTML'); + if (videoHtml) { + descriptionParts.push(videoHtml); + } + } + } + + const description = descriptionParts.length > 0 ? descriptionParts.join('') : undefined; + + return { + ...item, + author, + category: categories.length > 0 ? categories : item.category, + description, + pubDate, + }; + } catch { + // no-empty + return item; + } + }); +}