Skip to content

Commit a7c9fb3

Browse files
authored
Update PoE.Ninja match URLs for merged site (#1179)
* Update PoE.Ninja match URLs for merged site * Update upload URL for PoE.Ninja based on PR comments * Remove pattern matching where it wasn't used * Add flag to allow curl to follow redirects
1 parent 7d0e29f commit a7c9fb3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Launch.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ function launch:DownloadPage(url, callback, params)
268268
easy:setopt_url(url)
269269
easy:setopt(curl.OPT_USERAGENT, "Path of Building/]]..self.versionNumber..[[")
270270
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
271+
easy:setopt(curl.OPT_FOLLOWLOCATION, 1)
271272
if requestBody then
272273
easy:setopt(curl.OPT_POST, true)
273274
easy:setopt(curl.OPT_POSTFIELDS, requestBody)

src/Modules/BuildSiteTools.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ buildSites.websiteList = {
1717
codeOut = "https://pobb.in/", postUrl = "https://pobb.in/pob/", postFields = "", linkURL = "pobb.in/%1"
1818
},
1919
{
20-
label = "poe2.ninja", id = "Poe2Ninja", matchURL = "poe2%.ninja/pob/%w+", regexURL = "poe2%.ninja/pob/(%w+)%s*$", downloadURL = "poe2.ninja/pob/raw/%1",
21-
codeOut = "", postUrl = "https://poe2.ninja/pob/api/api_post.php", postFields = "api_paste_code=", linkURL="poe2.ninja/pob/%1"
20+
label = "poe.ninja", id = "PoeNinja", matchURL = "poe2?%.ninja/?p?o?e?2?/pob/%w+", regexURL = "poe2?%.ninja/?p?o?e?2?/pob/(%w+)%s*$", downloadURL = "poe.ninja/poe2/pob/raw/%1",
21+
codeOut = "", postUrl = "https://poe.ninja/poe2/pob/api/upload", postFields = "code=", linkURL="poe.ninja/poe2/pob/%1"
2222
},
2323
{
2424
label = "poe2db.tw", id = "PoE2DB", matchURL = "poe2db%.tw/.+", regexURL = "poe2db%.tw/pob/(.+)%s*$", downloadURL = "poe2db.tw/pob/%1/raw",
@@ -47,6 +47,7 @@ function buildSites.UploadBuild(buildCode, websiteInfo)
4747
easy:setopt(curl.OPT_USERAGENT, "Path of Building/]]..launch.versionNumber..[[")
4848
easy:setopt(curl.OPT_POSTFIELDS, ']]..websiteInfo.postFields..[['..code)
4949
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
50+
easy:setopt(curl.OPT_FOLLOWLOCATION, 1)
5051
if connectionProtocol then
5152
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
5253
end

0 commit comments

Comments
 (0)