chore: standardize formatting
This commit is contained in:
parent
e94e5a523c
commit
a0d064be6a
58 changed files with 971 additions and 1673 deletions
|
@ -2,11 +2,13 @@ const { extract } = require('@extractus/feed-extractor')
|
|||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const url = 'https://oku.club/rss/collection/POaRa'
|
||||
const asset = new AssetCache('books_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {})
|
||||
const data = res.entries
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
const url = 'https://oku.club/rss/collection/POaRa'
|
||||
const asset = new AssetCache('books_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
const data = res.entries
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
}
|
||||
|
|
Reference in a new issue