JDownloader Community - Appwork GmbH
 

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 16.09.2024, 18:38
svArtist's Avatar
svArtist svArtist is offline
DSL User
 
Join Date: Mar 2015
Posts: 39
Lightbulb 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",
	...
}
Won't you please look into this?

Thank you!

Last edited by pspzockerscene; 16.09.2024 at 18:44. Reason: Added SPOILER tag for image
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:32.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.