JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11.06.2017, 18: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 18:25. Reason: do not unmask urls
Reply With Quote
  #2  
Old 11.06.2017, 23: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, 02:18
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
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, 14:41
traverjg traverjg is offline
Super Loader
 
Join Date: Jul 2017
Posts: 28
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 10:40.
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 - 2024, Jelsoft Enterprises Ltd.