@@ -14,7 +14,10 @@ const cleanContent = (language, content) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getPubDate = (link) => timezone(parseDate(link.match(/(\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2})/)[1], 'YYYY-MM-DD-HH-mm-ss'), +9);
|
||||
const getPubDate = (link) => {
|
||||
const matches = link.match(/(\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}|\d{8})/);
|
||||
return matches ? timezone(parseDate(matches[1], 'YYYY-MM-DD-HH-mm-ss'), +9) : undefined;
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const language = ctx.params.language ?? 'cn';
|
||||
|
||||
Reference in New Issue
Block a user