Skip to content

Commit

Permalink
First fix for individual bunkr links
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyCloudDev authored Oct 19, 2024
1 parent b9b14f2 commit b639836
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dist/build.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @namespace https://github.com/SkyCloudDev
// @author SkyCloudDev
// @description Downloads images and videos from posts
// @version 2.9.5
// @version 2.9.6
// @updateURL https://github.com/SkyCloudDev/ForumPostDownloader/raw/main/dist/build.user.js
// @downloadURL https://github.com/SkyCloudDev/ForumPostDownloader/raw/main/dist/build.user.js
// @icon https://simp4.host.church/simpcityIcon192.png
Expand Down Expand Up @@ -1792,6 +1792,7 @@ const resolvers = [

// The file is an image.
if (isImage || isImagExtension) {
console.log('Image');
if (isImagExtension) {
return `https://i-${domain}.bunkr.ru/${filename}.${extension}`;
}
Expand All @@ -1804,10 +1805,11 @@ const resolvers = [
}

// The file is a document or an archive.
if (/\w+\/d\//.test(url)) {
else {
console.log('Doc');
const { dom } = await http.get(url);
const downloadPageURL = dom?.querySelector(`a[href^="https://get.bunkr"]`)?.href;
console.log(downloadPageURL);

if (!downloadPageURL) {
return null;
Expand Down

0 comments on commit b639836

Please sign in to comment.