chore: standardize formatting

This commit is contained in:
Cory Dransfeldt 2023-03-25 12:53:13 -07:00
parent e94e5a523c
commit a0d064be6a
No known key found for this signature in database
58 changed files with 971 additions and 1673 deletions

View file

@ -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
}