Removed HTML scraper from imgur module, no longer support due to login restriction. Preserving 'preview' property in index file.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user