Removed HTML scraper from imgur module, no longer support due to login restriction. Preserving 'preview' property in index file.

This commit is contained in:
2024-09-11 05:16:57 +02:00
parent d5d56b83bd
commit 416a3254fb
7 changed files with 392 additions and 372 deletions

View File

@@ -44,6 +44,10 @@ async function imgurAlbumApi(post) {
}
async function imgurAlbum(post) {
return imgurAlbumApi(post);
/*
* as of late 2019, imgur requires log in to view albums and gallery images
const res = await fetch(`https://imgur.com/a/${post.host.id}`);
const html = await res.text();
@@ -80,6 +84,7 @@ async function imgurAlbum(post) {
datetime: new Date(item.datetime),
})),
};
*/
}
module.exports = imgurAlbum;

View File

@@ -29,6 +29,10 @@ async function imgurImageApi(post) {
}
async function imgurImage(post) {
return imgurImageApi(post);
/*
* as of late 2019, imgur requires log in to view albums and gallery images
const res = await fetch(`https://imgur.com/${post.host.id}`);
const html = await res.text();
@@ -56,6 +60,7 @@ async function imgurImage(post) {
datetime: new Date(data.timestamp || data.datetime),
}],
};
*/
}
module.exports = imgurImage;