From 7a9f6c3402d78c5519cc5a3f39dd4bbefa8aff23 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 14 Sep 2025 05:55:34 -0400 Subject: [PATCH] Update PoE.Ninja URLs after migration (#8967) * Update PoE.Ninja URLs after migration * Fix urls that didn't need pattern matching * Support http redirects in curl lib * Update to allow old and new download URLs --- src/Launch.lua | 1 + src/Modules/BuildSiteTools.lua | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Launch.lua b/src/Launch.lua index c5ba5f68..5e526bfa 100644 --- a/src/Launch.lua +++ b/src/Launch.lua @@ -268,6 +268,7 @@ function launch:DownloadPage(url, callback, params) easy:setopt_url(url) easy:setopt(curl.OPT_USERAGENT, "Path of Building/]]..self.versionNumber..[[") easy:setopt(curl.OPT_ACCEPT_ENCODING, "") + easy:setopt(curl.OPT_FOLLOWLOCATION, 1) if requestBody then easy:setopt(curl.OPT_POST, true) easy:setopt(curl.OPT_POSTFIELDS, requestBody) diff --git a/src/Modules/BuildSiteTools.lua b/src/Modules/BuildSiteTools.lua index 4a03cfad..1e4a7a0e 100644 --- a/src/Modules/BuildSiteTools.lua +++ b/src/Modules/BuildSiteTools.lua @@ -13,8 +13,8 @@ buildSites.websiteList = { codeOut = "https://pobb.in/", postUrl = "https://pobb.in/pob/", postFields = "", linkURL = "pobb.in/%1" }, { - label = "PoeNinja", id = "PoeNinja", matchURL = "poe%.ninja/pob/%w+", regexURL = "poe%.ninja/pob/(%w+)%s*$", downloadURL = "poe.ninja/pob/raw/%1", - codeOut = "", postUrl = "https://poe.ninja/pob/api/api_post.php", postFields = "api_paste_code=", linkURL="poe.ninja/pob/%1" + label = "PoeNinja", id = "PoeNinja", matchURL = "poe%.ninja/?p?o?e?1?/pob/%w+", regexURL = "poe%.ninja(/?p?o?e?1?)/pob/(%w+)%s*$", downloadURL = "poe.ninja%1/pob/raw/%2", + codeOut = "", postUrl = "https://poe.ninja/poe1/pob/api/upload", postFields = "code=", linkURL="poe.ninja/poe1/pob/%1" }, { label = "Pastebin.com", id = "pastebin", matchURL = "pastebin%.com/%w+", regexURL = "pastebin%.com/(%w+)%s*$", downloadURL = "pastebin.com/raw/%1", linkURL = "pastebin.com/%1" @@ -40,6 +40,7 @@ function buildSites.UploadBuild(buildCode, websiteInfo) easy:setopt(curl.OPT_USERAGENT, "Path of Building/]]..launch.versionNumber..[[") easy:setopt(curl.OPT_POSTFIELDS, ']]..websiteInfo.postFields..[['..code) easy:setopt(curl.OPT_ACCEPT_ENCODING, "") + easy:setopt(curl.OPT_FOLLOWLOCATION, 1) if connectionProtocol then easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol) end