fix: GQ台灣部分图集 (#5740)
This commit is contained in:
parent
aeeaf1c279
commit
b0584950d1
|
|
@ -40,11 +40,17 @@ module.exports = async (ctx) => {
|
|||
|
||||
item.title = content('h1').text();
|
||||
|
||||
const article = content('section[data-test-id="ArticleBodyContent"]').html();
|
||||
const gallery = content('section[data-test-id="GalleryImage"]').html();
|
||||
|
||||
if (ctx.params.caty === 'video') {
|
||||
item.description = content('div[data-test-id="EmbedIframe"]').html() + content('p[data-test-id="DekText"]').parent().html();
|
||||
item.pubDate = new Date(detailResponse.data.match(/pubDate":"(.*?)","channel/)[1]).toUTCString();
|
||||
} else if (gallery !== null) {
|
||||
item.description = gallery;
|
||||
item.pubDate = new Date(detailResponse.data.match(/pubDate":"(.*?)","items/)[1]).toUTCString();
|
||||
} else {
|
||||
item.description = content('section[data-test-id="ArticleBodyContent"]').html();
|
||||
item.description = article;
|
||||
item.pubDate = new Date(detailResponse.data.match(/pubDate":"(.*?)","publishedRevisions/)[1]).toUTCString();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue