Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add heibaizhibo.com #6098

Merged
merged 5 commits into from
Nov 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/routes/heibaizhibo/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ module.exports = async (ctx) => {
const liveInfo = Function('const window={};' + response.data.match(/window\.__NUXT__=.*;/gm)[0] + 'return window.__NUXT__')();

const item =
liveInfo.data[0].live_info.startDate.length === 0
Object.keys(liveInfo.data[0].live_info).length === 0 || liveInfo.data[0].live_info.startDate === ''
? []
: [
{
title: liveInfo.data[0].text,
author: liveInfo.data[0].anchorInfo.nickname,
pubDate: new Date(liveInfo.data[0].live_info.startDate),
url: response.url,
guid: id + liveInfo.data[0].live_info.startDate,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

刚测试了一下最新的,这块儿删除之后。默认的guid就变成直播间的链接了,是否会导致一些只根据guid变化来判断是否有新条目的阅读器检测不到更新啊?不知道还有没有更好的办法呀。

link: response.url,
},
];

Expand Down