fix(route): fix zhihu/posts title (#10672)
This commit is contained in:
parent
a921d68201
commit
135cbfffea
|
|
@ -18,7 +18,8 @@ module.exports = async (ctx) => {
|
|||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const jsondata = $('#js-initialData');
|
||||
const authorname = $('.ProfileHeader-name').text();
|
||||
const authorname = $('.ProfileHeader-name').contents()
|
||||
.filter((_index, element) => element.type === 'text').text();
|
||||
const authordescription = $('.ProfileHeader-headline').text();
|
||||
|
||||
const parsed = JSON.parse(jsondata.html());
|
||||
|
|
|
|||
Loading…
Reference in New Issue