Added New Sensations. Returning null from q's date formatter when date is invalid.

This commit is contained in:
2020-02-21 03:51:57 +01:00
parent 111fc8ad00
commit 13a8221b92
28 changed files with 229 additions and 12 deletions

View File

@@ -73,9 +73,7 @@ async function getEntropy(buffer) {
}
async function extractItem(source) {
const res = await bhttp.get(source.src, {
responseTimeout: 10000,
});
const res = await bhttp.get(source.src);
if (res.statusCode === 200) {
const { q } = ex(res.body.toString());
@@ -116,9 +114,7 @@ async function fetchItem(source, index, existingItemsBySource, domain, role, att
logger.verbose(`Fetching media item from ${source.src || source}`);
const res = await bhttp.get(source.src || source, {
responseTimeout: 10000,
});
const res = await bhttp.get(source.src || source);
if (res.statusCode === 200) {
const { pathname } = new URL(source.src || source);