mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
chore: update dependencies
This commit is contained in:
@@ -66,7 +66,11 @@ module.exports = async (ctx) => {
|
||||
|
||||
// Spans for publish dates are the same cases as above.
|
||||
|
||||
item.pubDate = new Date((content('span.time').text().replace(/发布时间:/, '') || content('span.public_time').text()) + ' GMT+8').toUTCString();
|
||||
item.pubDate = new Date(
|
||||
(content('span.time')
|
||||
.text()
|
||||
.replace(/发布时间:/, '') || content('span.public_time').text()) + ' GMT+8'
|
||||
).toUTCString();
|
||||
|
||||
return item;
|
||||
} catch (e) {
|
||||
|
||||
@@ -15,8 +15,7 @@ module.exports = async (ctx) => {
|
||||
height: 440,
|
||||
width: 670,
|
||||
},
|
||||
query:
|
||||
'query GetArticlesGQL($articleSlug: String, $category: String, $authorSlug: String, $height: Int, $lastCursor: ID, $width: Int!, $first: Int) {\n articles(first: $first, after: $lastCursor, filter: {language__eq: chinese, articleSlug__eq: $articleSlug, categorySlug__eq: $category, authorSlug__eq: $authorSlug}) {\n edges {\n cursor\n node {\n __typename\n ... on ArticleInterface {\n title\n summary\n content\n url\n featuredAsset {\n ... on AssetInterface {\n caption\n __typename\n }\n ... on ManagedImage {\n transform(transform: {width: $width, height: $height, crop: FOCALPOINT, fit: CROP})\n __typename\n }\n ... on ManagedVideo {\n url\n __typename\n }\n __typename\n }\n isExclusive\n isSponsored\n published {\n value\n __typename\n }\n __typename\n }\n ... on InternalArticleInterface {\n authors {\n displayName\n slug\n __typename\n }\n __typename\n }\n ... on ExternalArticleInterface {\n source\n __typename\n }\n ... on CuratedArticleLink {\n _id\n title\n published {\n value\n __typename\n }\n url\n __typename\n }\n ... on SyndicatedArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n ... on OriginalArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n slug\n __typename\n }\n __typename\n }\n ... on FashionWeekReview {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n }\n __typename\n }\n __typename\n }\n}\n',
|
||||
query: 'query GetArticlesGQL($articleSlug: String, $category: String, $authorSlug: String, $height: Int, $lastCursor: ID, $width: Int!, $first: Int) {\n articles(first: $first, after: $lastCursor, filter: {language__eq: chinese, articleSlug__eq: $articleSlug, categorySlug__eq: $category, authorSlug__eq: $authorSlug}) {\n edges {\n cursor\n node {\n __typename\n ... on ArticleInterface {\n title\n summary\n content\n url\n featuredAsset {\n ... on AssetInterface {\n caption\n __typename\n }\n ... on ManagedImage {\n transform(transform: {width: $width, height: $height, crop: FOCALPOINT, fit: CROP})\n __typename\n }\n ... on ManagedVideo {\n url\n __typename\n }\n __typename\n }\n isExclusive\n isSponsored\n published {\n value\n __typename\n }\n __typename\n }\n ... on InternalArticleInterface {\n authors {\n displayName\n slug\n __typename\n }\n __typename\n }\n ... on ExternalArticleInterface {\n source\n __typename\n }\n ... on CuratedArticleLink {\n _id\n title\n published {\n value\n __typename\n }\n url\n __typename\n }\n ... on SyndicatedArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n ... on OriginalArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n slug\n __typename\n }\n __typename\n }\n ... on FashionWeekReview {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n }\n __typename\n }\n __typename\n }\n}\n',
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -27,7 +27,12 @@ module.exports = async (ctx) => {
|
||||
const detailResponse = await got({ method: 'get', url: item.link, responseType: 'buffer' });
|
||||
const content = cheerio.load(iconv.decode(detailResponse.data, 'gbk'));
|
||||
item.description = content('div.text').html();
|
||||
item.pubDate = new Date(content('#p_publishtime').text().replace(/[年|月]/g, '-').replace(/日/g, ' ') + ' GMT+8').toUTCString();
|
||||
item.pubDate = new Date(
|
||||
content('#p_publishtime')
|
||||
.text()
|
||||
.replace(/[年|月]/g, '-')
|
||||
.replace(/日/g, ' ') + ' GMT+8'
|
||||
).toUTCString();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
|
||||
@@ -40,7 +40,10 @@ module.exports = async (ctx, currentUrl, query) => {
|
||||
item.description = description.html();
|
||||
item.title = content('.article-title').text();
|
||||
item.pubDate = new Date(pubDate).toUTCString();
|
||||
item.author = info.join(' ').replace(/作者:/, '').replace(/原创/, '');
|
||||
item.author = info
|
||||
.join(' ')
|
||||
.replace(/作者:/, '')
|
||||
.replace(/原创/, '');
|
||||
|
||||
return item;
|
||||
})
|
||||
|
||||
@@ -65,7 +65,11 @@ module.exports = async (ctx) => {
|
||||
const detailResponse = await got({ method: 'get', url: item.link });
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
item.description = content('div.concent_center').html();
|
||||
item.pubDate = new Date(content('td[align="right"]').text().replace(/发布日期:/, '') + ' GMT+8').toUTCString();
|
||||
item.pubDate = new Date(
|
||||
content('td[align="right"]')
|
||||
.text()
|
||||
.replace(/发布日期:/, '') + ' GMT+8'
|
||||
).toUTCString();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
|
||||
@@ -48,7 +48,11 @@ module.exports = async (ctx) => {
|
||||
const detailResponse = await got({ method: 'get', url: item.link });
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
item.description = content('div.concent_center').html();
|
||||
item.pubDate = new Date(content('td[align="right"]').text().replace(/发布日期:/, '') + ' GMT+8').toUTCString();
|
||||
item.pubDate = new Date(
|
||||
content('td[align="right"]')
|
||||
.text()
|
||||
.replace(/发布日期:/, '') + ' GMT+8'
|
||||
).toUTCString();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
|
||||
@@ -20,8 +20,7 @@ module.exports = async (ctx) => {
|
||||
count: 25,
|
||||
maxShownVoters: 0,
|
||||
},
|
||||
query:
|
||||
'query HacktivityPageQuery($querystring: String, $orderBy: HacktivityItemOrderInput, $secureOrderBy: FiltersHacktivityItemFilterOrder, $where: FiltersHacktivityItemFilterInput, $count: Int, $cursor: String, $maxShownVoters: Int) {\n me {\n id\n __typename\n }\n hacktivity_items(first: $count, after: $cursor, query: $querystring, order_by: $orderBy, secure_order_by: $secureOrderBy, where: $where) {\n total_count\n ...HacktivityList\n __typename\n }\n}\n\nfragment HacktivityList on HacktivityItemConnection {\n total_count\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n edges {\n node {\n ... on HacktivityItemInterface {\n id\n databaseId: _id\n ...HacktivityItem\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment HacktivityItem on HacktivityItemUnion {\n type: __typename\n ... on HacktivityItemInterface {\n id\n votes {\n total_count\n __typename\n }\n voters: votes(last: $maxShownVoters) {\n edges {\n node {\n id\n user {\n id\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n upvoted: upvoted_by_current_user\n __typename\n }\n ... on Undisclosed {\n id\n ...HacktivityItemUndisclosed\n __typename\n }\n ... on Disclosed {\n id\n ...HacktivityItemDisclosed\n __typename\n }\n ... on HackerPublished {\n id\n ...HacktivityItemHackerPublished\n __typename\n }\n}\n\nfragment HacktivityItemUndisclosed on Undisclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n requires_view_privilege\n total_awarded_amount\n currency\n __typename\n}\n\nfragment TeamLinkWithMiniProfile on Team {\n id\n handle\n name\n __typename\n}\n\nfragment UserLinkWithMiniProfile on User {\n id\n username\n __typename\n}\n\nfragment HacktivityItemDisclosed on Disclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n title\n substate\n url\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n total_awarded_amount\n severity_rating\n currency\n __typename\n}\n\nfragment HacktivityItemHackerPublished on HackerPublished {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n id\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n url\n title\n substate\n __typename\n }\n latest_disclosable_activity_at\n severity_rating\n __typename\n}',
|
||||
query: 'query HacktivityPageQuery($querystring: String, $orderBy: HacktivityItemOrderInput, $secureOrderBy: FiltersHacktivityItemFilterOrder, $where: FiltersHacktivityItemFilterInput, $count: Int, $cursor: String, $maxShownVoters: Int) {\n me {\n id\n __typename\n }\n hacktivity_items(first: $count, after: $cursor, query: $querystring, order_by: $orderBy, secure_order_by: $secureOrderBy, where: $where) {\n total_count\n ...HacktivityList\n __typename\n }\n}\n\nfragment HacktivityList on HacktivityItemConnection {\n total_count\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n edges {\n node {\n ... on HacktivityItemInterface {\n id\n databaseId: _id\n ...HacktivityItem\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment HacktivityItem on HacktivityItemUnion {\n type: __typename\n ... on HacktivityItemInterface {\n id\n votes {\n total_count\n __typename\n }\n voters: votes(last: $maxShownVoters) {\n edges {\n node {\n id\n user {\n id\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n upvoted: upvoted_by_current_user\n __typename\n }\n ... on Undisclosed {\n id\n ...HacktivityItemUndisclosed\n __typename\n }\n ... on Disclosed {\n id\n ...HacktivityItemDisclosed\n __typename\n }\n ... on HackerPublished {\n id\n ...HacktivityItemHackerPublished\n __typename\n }\n}\n\nfragment HacktivityItemUndisclosed on Undisclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n requires_view_privilege\n total_awarded_amount\n currency\n __typename\n}\n\nfragment TeamLinkWithMiniProfile on Team {\n id\n handle\n name\n __typename\n}\n\nfragment UserLinkWithMiniProfile on User {\n id\n username\n __typename\n}\n\nfragment HacktivityItemDisclosed on Disclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n title\n substate\n url\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n total_awarded_amount\n severity_rating\n currency\n __typename\n}\n\nfragment HacktivityItemHackerPublished on HackerPublished {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n id\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n url\n title\n substate\n __typename\n }\n latest_disclosable_activity_at\n severity_rating\n __typename\n}',
|
||||
},
|
||||
responseType: 'json',
|
||||
});
|
||||
|
||||
@@ -23,8 +23,7 @@ module.exports = async (ctx) => {
|
||||
count: 25,
|
||||
maxShownVoters: 0,
|
||||
},
|
||||
query:
|
||||
'query HacktivityPageQuery($querystring: String, $orderBy: HacktivityItemOrderInput, $secureOrderBy: FiltersHacktivityItemFilterOrder, $where: FiltersHacktivityItemFilterInput, $count: Int, $cursor: String, $maxShownVoters: Int) {\n me {\n id\n __typename\n }\n hacktivity_items(first: $count, after: $cursor, query: $querystring, order_by: $orderBy, secure_order_by: $secureOrderBy, where: $where) {\n total_count\n ...HacktivityList\n __typename\n }\n}\n\nfragment HacktivityList on HacktivityItemConnection {\n total_count\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n edges {\n node {\n ... on HacktivityItemInterface {\n id\n databaseId: _id\n ...HacktivityItem\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment HacktivityItem on HacktivityItemUnion {\n type: __typename\n ... on HacktivityItemInterface {\n id\n votes {\n total_count\n __typename\n }\n voters: votes(last: $maxShownVoters) {\n edges {\n node {\n id\n user {\n id\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n upvoted: upvoted_by_current_user\n __typename\n }\n ... on Undisclosed {\n id\n ...HacktivityItemUndisclosed\n __typename\n }\n ... on Disclosed {\n id\n ...HacktivityItemDisclosed\n __typename\n }\n ... on HackerPublished {\n id\n ...HacktivityItemHackerPublished\n __typename\n }\n}\n\nfragment HacktivityItemUndisclosed on Undisclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n requires_view_privilege\n total_awarded_amount\n currency\n __typename\n}\n\nfragment TeamLinkWithMiniProfile on Team {\n id\n handle\n name\n __typename\n}\n\nfragment UserLinkWithMiniProfile on User {\n id\n username\n __typename\n}\n\nfragment HacktivityItemDisclosed on Disclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n title\n substate\n url\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n total_awarded_amount\n severity_rating\n currency\n __typename\n}\n\nfragment HacktivityItemHackerPublished on HackerPublished {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n id\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n url\n title\n substate\n __typename\n }\n latest_disclosable_activity_at\n severity_rating\n __typename\n}',
|
||||
query: 'query HacktivityPageQuery($querystring: String, $orderBy: HacktivityItemOrderInput, $secureOrderBy: FiltersHacktivityItemFilterOrder, $where: FiltersHacktivityItemFilterInput, $count: Int, $cursor: String, $maxShownVoters: Int) {\n me {\n id\n __typename\n }\n hacktivity_items(first: $count, after: $cursor, query: $querystring, order_by: $orderBy, secure_order_by: $secureOrderBy, where: $where) {\n total_count\n ...HacktivityList\n __typename\n }\n}\n\nfragment HacktivityList on HacktivityItemConnection {\n total_count\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n edges {\n node {\n ... on HacktivityItemInterface {\n id\n databaseId: _id\n ...HacktivityItem\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\n\nfragment HacktivityItem on HacktivityItemUnion {\n type: __typename\n ... on HacktivityItemInterface {\n id\n votes {\n total_count\n __typename\n }\n voters: votes(last: $maxShownVoters) {\n edges {\n node {\n id\n user {\n id\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n upvoted: upvoted_by_current_user\n __typename\n }\n ... on Undisclosed {\n id\n ...HacktivityItemUndisclosed\n __typename\n }\n ... on Disclosed {\n id\n ...HacktivityItemDisclosed\n __typename\n }\n ... on HackerPublished {\n id\n ...HacktivityItemHackerPublished\n __typename\n }\n}\n\nfragment HacktivityItemUndisclosed on Undisclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n requires_view_privilege\n total_awarded_amount\n currency\n __typename\n}\n\nfragment TeamLinkWithMiniProfile on Team {\n id\n handle\n name\n __typename\n}\n\nfragment UserLinkWithMiniProfile on User {\n id\n username\n __typename\n}\n\nfragment HacktivityItemDisclosed on Disclosed {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n id\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n title\n substate\n url\n __typename\n }\n latest_disclosable_action\n latest_disclosable_activity_at\n total_awarded_amount\n severity_rating\n currency\n __typename\n}\n\nfragment HacktivityItemHackerPublished on HackerPublished {\n id\n reporter {\n id\n username\n ...UserLinkWithMiniProfile\n __typename\n }\n team {\n id\n handle\n name\n medium_profile_picture: profile_picture(size: medium)\n url\n ...TeamLinkWithMiniProfile\n __typename\n }\n report {\n id\n url\n title\n substate\n __typename\n }\n latest_disclosable_activity_at\n severity_rating\n __typename\n}',
|
||||
},
|
||||
responseType: 'json',
|
||||
});
|
||||
|
||||
@@ -109,7 +109,13 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
const articleImg = content('.hkej_detail_thumb_2014 .enlargeImg').html() ?? '';
|
||||
|
||||
const pubDate = content('p.info span.date').text().trim().replace('日', '').replace('今', today).replace('昨', yesterday).replace(/[年月]/g, '-');
|
||||
const pubDate = content('p.info span.date')
|
||||
.text()
|
||||
.trim()
|
||||
.replace('日', '')
|
||||
.replace('今', today)
|
||||
.replace('昨', yesterday)
|
||||
.replace(/[年月]/g, '-');
|
||||
|
||||
item.category = content('p.info span.cate a')
|
||||
.toArray()
|
||||
|
||||
@@ -38,7 +38,10 @@ module.exports = async (ctx) => {
|
||||
let date;
|
||||
|
||||
if (content('h4').text()) {
|
||||
date = content('h4').text().replace(/(年|月)/g, '-').replace(/日/, '');
|
||||
date = content('h4')
|
||||
.text()
|
||||
.replace(/(年|月)/g, '-')
|
||||
.replace(/日/, '');
|
||||
item.title += ` | ${content('h4').text()}`;
|
||||
} else {
|
||||
date = new Date(content('time.entry-date').attr('datetime'));
|
||||
|
||||
@@ -35,7 +35,11 @@ module.exports = async (ctx) => {
|
||||
const $ = cheerio.load(resourceResponse.data);
|
||||
|
||||
item.link = $('.addgz').attr('href');
|
||||
item.pubDate = new Date($('.duration').text().replace(/更新时间:/, '')).toUTCString();
|
||||
item.pubDate = new Date(
|
||||
$('.duration')
|
||||
.text()
|
||||
.replace(/更新时间:/, '')
|
||||
).toUTCString();
|
||||
|
||||
return item;
|
||||
})
|
||||
|
||||
@@ -8,18 +8,15 @@ module.exports = async (ctx) => {
|
||||
requests: [
|
||||
{
|
||||
indexName: 'noa_aem_game_en_us_release_des',
|
||||
params:
|
||||
'query=&hitsPerPage=42&maxValuesPerFacet=30&page=0&facets=%5B%22generalFilters%22%2C%22platform%22%2C%22availability%22%2C%22categories%22%2C%22filterShops%22%2C%22virtualConsole%22%2C%22characters%22%2C%22priceRange%22%2C%22esrb%22%2C%22filterPlayers%22%5D&tagFilters=&facetFilters=%5B%5B%22availability%3ANew%20releases%22%5D%2C%5B%22platform%3ANintendo%20Switch%22%5D%5D',
|
||||
params: 'query=&hitsPerPage=42&maxValuesPerFacet=30&page=0&facets=%5B%22generalFilters%22%2C%22platform%22%2C%22availability%22%2C%22categories%22%2C%22filterShops%22%2C%22virtualConsole%22%2C%22characters%22%2C%22priceRange%22%2C%22esrb%22%2C%22filterPlayers%22%5D&tagFilters=&facetFilters=%5B%5B%22availability%3ANew%20releases%22%5D%2C%5B%22platform%3ANintendo%20Switch%22%5D%5D',
|
||||
},
|
||||
{
|
||||
indexName: 'noa_aem_game_en_us_release_des',
|
||||
params:
|
||||
'query=&hitsPerPage=1&maxValuesPerFacet=30&page=0&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&facets=availability&facetFilters=%5B%5B%22platform%3ANintendo%20Switch%22%5D%5D',
|
||||
params: 'query=&hitsPerPage=1&maxValuesPerFacet=30&page=0&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&facets=availability&facetFilters=%5B%5B%22platform%3ANintendo%20Switch%22%5D%5D',
|
||||
},
|
||||
{
|
||||
indexName: 'noa_aem_game_en_us_release_des',
|
||||
params:
|
||||
'query=&hitsPerPage=1&maxValuesPerFacet=30&page=0&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&facets=platform&facetFilters=%5B%5B%22availability%3ANew%20releases%22%5D%5D',
|
||||
params: 'query=&hitsPerPage=1&maxValuesPerFacet=30&page=0&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&facets=platform&facetFilters=%5B%5B%22availability%3ANew%20releases%22%5D%5D',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -12,7 +12,10 @@ const statusListParser = ($) => {
|
||||
.get()
|
||||
.join('<br/>');
|
||||
const link = mainNode.find('.content a').first().attr('href');
|
||||
const content = mainNode.text().trim().replace(/展开全文$/, '');
|
||||
const content = mainNode
|
||||
.text()
|
||||
.trim()
|
||||
.replace(/展开全文$/, '');
|
||||
return {
|
||||
title: content,
|
||||
link: link.startsWith('http') ? link : `https:${link}`,
|
||||
|
||||
@@ -101,7 +101,13 @@ module.exports = async (ctx) => {
|
||||
|
||||
item.author = content('.appellation').text();
|
||||
item.description = content('.highlight, .text').html() || content('.content').html();
|
||||
item.pubDate = new Date(content('.puttime_mobi, .pubtime, .headtitle span').text().replace('发表于', '').replace(/(年|月)/g, '-').replace('日', '')).toUTCString();
|
||||
item.pubDate = new Date(
|
||||
content('.puttime_mobi, .pubtime, .headtitle span')
|
||||
.text()
|
||||
.replace('发表于', '')
|
||||
.replace(/(年|月)/g, '-')
|
||||
.replace('日', '')
|
||||
).toUTCString();
|
||||
|
||||
return item;
|
||||
})
|
||||
|
||||
@@ -4,16 +4,14 @@ module.exports = async (ctx) => {
|
||||
const data = (
|
||||
await got({
|
||||
method: 'get',
|
||||
url:
|
||||
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyinclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||
url: 'https://pay.weixin.qq.com/index.php/public/cms/get_contents?id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyinclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||
})
|
||||
).data.data.contentlist;
|
||||
|
||||
const data2 = (
|
||||
await got({
|
||||
method: 'get',
|
||||
url:
|
||||
'https://pay.weixin.qq.com/index.php/public/cms/get_contents?pagenum=1&id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyexclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||
url: 'https://pay.weixin.qq.com/index.php/public/cms/get_contents?pagenum=1&id=6200&cmstype=1&url=https%253A%252F%252Fpay.weixin.qq.com%252Fpublic%252Fcms%252Fcontent_list%253Flang%253Dzh%2526id%253D6200&states=2&publishtimeend=1565537507&expiretimebeg=1565537507&propertyexclude=1&ordertype=4&field=contentId%2CcontentTitle%2CcontentPublishTime&g_ty=ajax',
|
||||
})
|
||||
).data.data.contentlist;
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
ctx.state.data = {
|
||||
title: '停水通知 - 广州市自来水96968',
|
||||
link:
|
||||
'https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDE0NzAxMw%3D%3D&hid=15&sn=270abafdcf67ce4e2b52a049a0aa219a&scene=1&sharer_username=&clicktime=&devicetype=iOS12.2&version=1700042b&lang=zh_CN&nettype=WIFI&ascene=0&fontScale=100&wx_header=1',
|
||||
link: 'https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDE0NzAxMw%3D%3D&hid=15&sn=270abafdcf67ce4e2b52a049a0aa219a&scene=1&sharer_username=&clicktime=&devicetype=iOS12.2&version=1700042b&lang=zh_CN&nettype=WIFI&ascene=0&fontScale=100&wx_header=1',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,7 +31,14 @@ module.exports = async (ctx) => {
|
||||
} else {
|
||||
const temp = await got(link);
|
||||
single.description = $(temp.data).find('.works-cont').html();
|
||||
single.pubDate = new Date($(temp.data).find('.works-top').find('.time').find('em').text().replace(/更新于:/g, '')).toUTCString();
|
||||
single.pubDate = new Date(
|
||||
$(temp.data)
|
||||
.find('.works-top')
|
||||
.find('.time')
|
||||
.find('em')
|
||||
.text()
|
||||
.replace(/更新于:/g, '')
|
||||
).toUTCString();
|
||||
|
||||
ctx.cache.set(description_key, single.description);
|
||||
ctx.cache.set(pubDate_key, single.pubDate);
|
||||
|
||||
@@ -62,7 +62,12 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
const title = $(typeConfig.selector.title).text();
|
||||
const dateText = $(typeConfig.selector.date).text().split(' ')[0].replace(/时间:/, '').replace(/[年月日]/g, '/').trim();
|
||||
const dateText = $(typeConfig.selector.date)
|
||||
.text()
|
||||
.split(' ')[0]
|
||||
.replace(/时间:/, '')
|
||||
.replace(/[年月日]/g, '/')
|
||||
.trim();
|
||||
let content = $(typeConfig.selector.content).html();
|
||||
content = content.replace(/\/__local/g, 'http://www.nuc.edu.cn/__local');
|
||||
const data = {
|
||||
|
||||
@@ -5,8 +5,7 @@ module.exports = async (ctx) => {
|
||||
data: { data },
|
||||
} = await got({
|
||||
method: 'get',
|
||||
url:
|
||||
'https://m.weibo.cn/api/container/getIndex?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&title=%E5%BE%AE%E5%8D%9A%E7%83%AD%E6%90%9C&extparam=filter_type%3Drealtimehot%26mi_cid%3D100103%26pos%3D0_0%26c_type%3D30%26display_time%3D1540538388&luicode=10000011&lfid=231583',
|
||||
url: 'https://m.weibo.cn/api/container/getIndex?containerid=106003type%3D25%26t%3D3%26disable_hot%3D1%26filter_type%3Drealtimehot&title=%E5%BE%AE%E5%8D%9A%E7%83%AD%E6%90%9C&extparam=filter_type%3Drealtimehot%26mi_cid%3D100103%26pos%3D0_0%26c_type%3D30%26display_time%3D1540538388&luicode=10000011&lfid=231583',
|
||||
headers: {
|
||||
Referer: 'https://s.weibo.com/top/summary?cate=realtimehot',
|
||||
'MWeibo-Pwa': 1,
|
||||
|
||||
@@ -2,134 +2,9 @@ const crypto = require('crypto');
|
||||
const getParams = (ep) => {
|
||||
const a1 = 'xkt3a41psizxrh9l';
|
||||
const a = [
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
62,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
63,
|
||||
52,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
40,
|
||||
41,
|
||||
42,
|
||||
43,
|
||||
44,
|
||||
45,
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
50,
|
||||
51,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59,
|
||||
60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
|
||||
44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
|
||||
];
|
||||
let o = ep.length;
|
||||
let r = 0;
|
||||
|
||||
@@ -53,7 +53,9 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').text().replace(/最新的/, $('.article-nav .active').text()),
|
||||
title: $('title')
|
||||
.text()
|
||||
.replace(/最新的/, $('.article-nav .active').text()),
|
||||
link: currentUrl,
|
||||
item: items,
|
||||
description: $('meta[property="og:description"]').attr('content'),
|
||||
|
||||
@@ -51,7 +51,14 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
item.author = content('.fl.black').text();
|
||||
item.pubDate = timezone(parseDate(content('.fl.gray').text().replace(/发表于: /, '')), +8);
|
||||
item.pubDate = timezone(
|
||||
parseDate(
|
||||
content('.fl.gray')
|
||||
.text()
|
||||
.replace(/发表于: /, '')
|
||||
),
|
||||
+8
|
||||
);
|
||||
|
||||
const downloadLink = content('#read_tpc').first().find('a').last();
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ module.exports = {
|
||||
// link: 'https://www.epicgames.com/store/zh-CN/collection/free-games-collection',
|
||||
link: 'https://www.epicgames.com/store/backend/graphql-proxy',
|
||||
jsonData: JSON.stringify({
|
||||
query:
|
||||
'query searchStoreQuery($allowCountries: String, $category: String, $count: Int, $country: String!, $keywords: String, $locale: String, $namespace: String, $sortBy: String, $sortDir: String, $start: Int, $tag: String, $withPrice: Boolean = false, $withPromotions: Boolean = false) {\n Catalog {\n searchStore(allowCountries: $allowCountries, category: $category, count: $count, country: $country, keywords: $keywords, locale: $locale, namespace: $namespace, sortBy: $sortBy, sortDir: $sortDir, start: $start, tag: $tag) {\n elements {\n title\n id\n namespace\n description\n effectiveDate\n keyImages {\n type\n url\n }\n seller {\n id\n name\n }\n productSlug\n urlSlug\n url\n items {\n id\n namespace\n }\n customAttributes {\n key\n value\n }\n categories {\n path\n }\n price(country: $country) @include(if: $withPrice) {\n totalPrice {\n discountPrice\n originalPrice\n voucherDiscount\n discount\n currencyCode\n currencyInfo {\n decimals\n }\n fmtPrice(locale: $locale) {\n originalPrice\n discountPrice\n intermediatePrice\n }\n }\n lineOffers {\n appliedRules {\n id\n endDate\n discountSetting {\n discountType\n }\n }\n }\n }\n promotions(category: $category) @include(if: $withPromotions) {\n promotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n upcomingPromotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n }\n }\n paging {\n count\n total\n }\n }\n }\n}\n',
|
||||
query: 'query searchStoreQuery($allowCountries: String, $category: String, $count: Int, $country: String!, $keywords: String, $locale: String, $namespace: String, $sortBy: String, $sortDir: String, $start: Int, $tag: String, $withPrice: Boolean = false, $withPromotions: Boolean = false) {\n Catalog {\n searchStore(allowCountries: $allowCountries, category: $category, count: $count, country: $country, keywords: $keywords, locale: $locale, namespace: $namespace, sortBy: $sortBy, sortDir: $sortDir, start: $start, tag: $tag) {\n elements {\n title\n id\n namespace\n description\n effectiveDate\n keyImages {\n type\n url\n }\n seller {\n id\n name\n }\n productSlug\n urlSlug\n url\n items {\n id\n namespace\n }\n customAttributes {\n key\n value\n }\n categories {\n path\n }\n price(country: $country) @include(if: $withPrice) {\n totalPrice {\n discountPrice\n originalPrice\n voucherDiscount\n discount\n currencyCode\n currencyInfo {\n decimals\n }\n fmtPrice(locale: $locale) {\n originalPrice\n discountPrice\n intermediatePrice\n }\n }\n lineOffers {\n appliedRules {\n id\n endDate\n discountSetting {\n discountType\n }\n }\n }\n }\n promotions(category: $category) @include(if: $withPromotions) {\n promotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n upcomingPromotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n }\n }\n paging {\n count\n total\n }\n }\n }\n}\n',
|
||||
variables: {
|
||||
allowCountries: 'CN',
|
||||
category: 'freegames',
|
||||
|
||||
@@ -123,7 +123,13 @@ module.exports = async (ctx) => {
|
||||
})
|
||||
.get();
|
||||
|
||||
const pubDate = content('p.info span.date').text().trim().replace('日', '').replace('今', today).replace('昨', yesterday).replace(/[年月]/g, '-');
|
||||
const pubDate = content('p.info span.date')
|
||||
.text()
|
||||
.trim()
|
||||
.replace('日', '')
|
||||
.replace('今', today)
|
||||
.replace('昨', yesterday)
|
||||
.replace(/[年月]/g, '-');
|
||||
|
||||
item.category = content('p.info span.cate a')
|
||||
.toArray()
|
||||
|
||||
+4
-1
@@ -39,7 +39,10 @@ module.exports = async (ctx) => {
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
|
||||
item.description = content('.mrt20').html();
|
||||
item.author = content('.mrl20').text().trim().replace(/作者:/, '');
|
||||
item.author = content('.mrl20')
|
||||
.text()
|
||||
.trim()
|
||||
.replace(/作者:/, '');
|
||||
item.pubDate = parseDate(content('.date').eq(0).text(), 'YYYY年MM月DD日');
|
||||
|
||||
return item;
|
||||
|
||||
@@ -18,7 +18,10 @@ module.exports = async function get_article(url) {
|
||||
|
||||
const date_raw = $('div.talk_time').clone().children().remove().end().text();
|
||||
const date_str_zh = date_raw.replace(/^[^`]*发表于(.*分)[^`]*$/g, '$1'); // use [^`] to match \n
|
||||
const date_str = date_str_zh.replace(/[年月]/g, '-').replace(/时/g, ':').replace(/[日分]/g, '');
|
||||
const date_str = date_str_zh
|
||||
.replace(/[年月]/g, '-')
|
||||
.replace(/时/g, ':')
|
||||
.replace(/[日分]/g, '');
|
||||
|
||||
const title = $('div.block_m > div.ct_tittle > div.bg_htit > h2').text();
|
||||
const category = $('div.icon_float > a').attr('title');
|
||||
|
||||
+28
-28
@@ -41,9 +41,9 @@
|
||||
"homepage": "https://github.com/DIYgod/RSSHub#readme",
|
||||
"devDependencies": {
|
||||
"@napi-rs/pinyin": "^1.6.1",
|
||||
"@types/cheerio": "0.22.24",
|
||||
"@types/got": "9.6.11",
|
||||
"@types/koa": "2.13.1",
|
||||
"@types/cheerio": "0.22.30",
|
||||
"@types/got": "9.6.12",
|
||||
"@types/koa": "2.13.4",
|
||||
"@vercel/nft": "0.9.6",
|
||||
"@vuepress/plugin-back-to-top": "1.8.2",
|
||||
"@vuepress/plugin-google-analytics": "1.8.2",
|
||||
@@ -57,35 +57,35 @@
|
||||
"fs-extra": "^8.1.0",
|
||||
"jest": "26.6.3",
|
||||
"mockdate": "3.0.5",
|
||||
"nock": "13.0.11",
|
||||
"nodemon": "2.0.7",
|
||||
"prettier": "2.2.1",
|
||||
"nock": "13.2.1",
|
||||
"nodemon": "2.0.15",
|
||||
"prettier": "2.5.0",
|
||||
"prettier-check": "2.0.0",
|
||||
"pretty-quick": "3.1.1",
|
||||
"pretty-quick": "3.1.2",
|
||||
"remark": "12.0.1",
|
||||
"remark-frontmatter": "2.0.0",
|
||||
"remark-pangu": "2.2.0",
|
||||
"remark-preset-prettier": "0.4.1",
|
||||
"staged-git-files": "1.2.0",
|
||||
"string-width": "4.2.2",
|
||||
"supertest": "6.1.3",
|
||||
"supertest": "6.1.6",
|
||||
"tosource": "2.0.0-alpha.3",
|
||||
"vuepress": "1.8.2",
|
||||
"yorkie": "2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@koa/router": "10.0.0",
|
||||
"@postlight/mercury-parser": "2.2.0",
|
||||
"@sentry/node": "6.7.2",
|
||||
"@koa/router": "10.1.1",
|
||||
"@postlight/mercury-parser": "2.2.1",
|
||||
"@sentry/node": "6.15.0",
|
||||
"aes-js": "3.1.2",
|
||||
"art-template": "4.13.2",
|
||||
"bbcodejs": "0.0.4",
|
||||
"cheerio": "1.0.0-rc.3",
|
||||
"chrono-node": "2.2.6",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"chrono-node": "2.3.4",
|
||||
"city-timezones": "^1.2.0",
|
||||
"crypto-js": "4.0.0",
|
||||
"crypto-js": "4.1.1",
|
||||
"currency-symbol-map": "4.0.4",
|
||||
"dayjs": "1.10.3",
|
||||
"dayjs": "1.10.7",
|
||||
"dotenv": "8.5.1",
|
||||
"emailjs-imap-client": "3.1.0",
|
||||
"entities": "2.1.0",
|
||||
@@ -94,36 +94,36 @@
|
||||
"fs-extra": "^8.1.0",
|
||||
"git-rev-sync": "3.0.1",
|
||||
"googleapis": "73.0.0",
|
||||
"got": "11.8.2",
|
||||
"got": "11.8.3",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"iconv-lite": "0.6.2",
|
||||
"instagram-private-api": "1.44.1",
|
||||
"ioredis": "4.27.2",
|
||||
"iconv-lite": "0.6.3",
|
||||
"instagram-private-api": "1.45.2",
|
||||
"ioredis": "4.28.1",
|
||||
"ip": "*",
|
||||
"ip-regex": "4.2.0",
|
||||
"ip-regex": "4.3.0",
|
||||
"is-localhost-ip": "1.4.0",
|
||||
"jsdom": "16.5.3",
|
||||
"json-bigint": "1.0.0",
|
||||
"json5": "2.2.0",
|
||||
"koa": "2.13.1",
|
||||
"koa": "2.13.4",
|
||||
"koa-basic-auth": "4.0.0",
|
||||
"koa-favicon": "2.1.0",
|
||||
"koa-mount": "4.0.0",
|
||||
"lru-cache": "6.0.0",
|
||||
"lz-string": "1.4.4",
|
||||
"mailparser": "3.2.0",
|
||||
"markdown-it": "12.0.6",
|
||||
"mailparser": "3.4.0",
|
||||
"markdown-it": "12.2.0",
|
||||
"module-alias": "2.2.2",
|
||||
"parse-torrent": "9.1.3",
|
||||
"parse-torrent": "9.1.4",
|
||||
"pidusage": "2.0.21",
|
||||
"plist": "3.0.2",
|
||||
"plist": "3.0.4",
|
||||
"puppeteer": "9.1.1",
|
||||
"query-string": "7.0.1",
|
||||
"require-all": "3.0.0",
|
||||
"rss-parser": "3.10.0",
|
||||
"rss-parser": "3.12.0",
|
||||
"showdown": "1.9.1",
|
||||
"simplecc-wasm": "0.1.2",
|
||||
"socks-proxy-agent": "6.0.0",
|
||||
"simplecc-wasm": "0.1.4",
|
||||
"socks-proxy-agent": "6.1.1",
|
||||
"string-similarity": "^4.0.3",
|
||||
"tiny-async-pool": "1.2.0",
|
||||
"torrent-search-api": "^2.1.3",
|
||||
|
||||
Reference in New Issue
Block a user