#1
|
||||
|
||||
Custom User Agent map?
I'm sad to see that you won't implement changing the default User Agent used by JD.
(FWIW, It seems to me it would introduce very little trouble that couldn't be left up to the user and just be included in the log files; it seems weird to simply not do anything for such an important feature request because of some potential issues. You could say that about any feature 😅) My website (that I started using for supplementary DLs) host recently started blocking requests from JD with a 503 status, whereas the same request sent with a different UA goes through. JS test, showcasing the User Agent being the only variable leading to a different outcome: Code:
var agents = { jd: { label: "JDownloader", str: "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:76.0) Gecko/20100101 Firefox/76.0" }, ch: { label: "Chrome", str: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" } }; var url = "**External links are only visible to Support Staff**; var ua = agents.jd; // ua = agents.ch; var headers = new Headers({ "User-Agent": ua.str }); console.log("Using", ua.label + ":", ua.str); fetch(new Request(url, { headers })).then(async (res)=>{ console.log(res.status); });
Spoiler:
I'm talking to them trying to make them undo what ever they did, but I'm not too hopeful that they will. In the mean time, we need something to specify how requests are made in some way, outside the few plugins that support a custom UA. I'd like to suggest a custom map of host URL patterns to UA strings, something like: Code:
{ "example.com": "My neat UA", "my-RegExp-url[_-]pattern\\.\\w{2,5}(\\/path\\/(.+))?": "Other cool UA", ... } Thank you! Last edited by pspzockerscene; 16.09.2024 at 18:44. Reason: Added SPOILER tag for image |
Thread Tools | |
Display Modes | |
|
|