JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 11.06.2017, 17:46
Wasabi Wasabi is offline
Junior Loader
 
Join Date: Jun 2014
Posts: 10
Default Just curious - how is JD2 able to resolve filenames on certain filehosts so well?

For example:

**External links are only visible to Support Staff****External links are only visible to Support Staff**

displays the filename as
"Dance Classics - Best Of V....part2.rar"

when the full filename is actually:
"Dance Classics - Best Of Vol. 2.part2.rar

The shortened filename is also used when AllDebrid unrestricts it on their website. Obviously this is a problem when there is a Vol. 1, Vol. 2, etc...

Yet JD2 knows exactly the full filename upon adding the original link, and is smart enough not to use the short filename even after unrestricting with the AllDebrid plugin.

Does each filehoster plug-in have code that cleverly parses the HTML for the filename or am I missing something obvious?

Last edited by raztoki; 24.08.2017 at 17:25. Reason: do not unmask urls
Reply With Quote
  #2  
Old 11.06.2017, 22:50
Wasabi Wasabi is offline
Junior Loader
 
Join Date: Jun 2014
Posts: 10
Default

Never mind - this is where the magic happens:

Code:
String fileName = this.br.getRegex("<title>\\s*(?:Download\\s+file|Datei\\s+downloaden)\\s*(.*?)\\s*\\(([\\d\\.,]+\\s*[BMGTP]{1,2})\\)\\s*\\|\\s*TurboBit\\.net").getMatch(0);
Mipony and AntDownloader don't do this, and they can cause a massive mess in the download folder. JD2 rocks
Reply With Quote
  #3  
Old 12.06.2017, 01:18
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,195
Default

depends on the file hoster, best bet is to check the source code.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #4  
Old 24.08.2017, 13:41
traverjg traverjg is offline
JD Alpha
 
Join Date: Jul 2017
Posts: 25
Thumbs up

Quote:
Originally Posted by Wasabi View Post
Never mind - this is where the magic happens:

Code:
String fileName = this.br.getRegex("<title>\\s*(?:Download\\s+file|Datei\\s+downloaden)\\s*(.*?)\\s*\\(([\\d\\.,]+\\s*[BMGTP]{1,2})\\)\\s*\\|\\s*TurboBit\\.net").getMatch(0);
Mipony and AntDownloader don't do this, and they can cause a massive mess in the download folder. JD2 rocks
That's cool. I was kind of wondering that myself. Thanks for following up with the answer.
Reply With Quote
Reply

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 18:20.
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 - 2019, Jelsoft Enterprises Ltd.