#1
|
|||
|
|||
KernelVideoSharing (Camwhoresbay)
JDownloader consistently chose the lowest resolution.
My solution (KernelVideoSharingCom.java) Code:
if (inValidate(dllink, plugin)) { // HD javwhores int test = br.getRegex("video_alt_url\\d?\\s*:\\s*\\'((?:http|/)[^<>\"]*?)\\'").count(); dllink = br.getRegex("video_alt_url" + test + "\\s*:\\s*\\'((?:http|/)[^<>\"]*?)\\'").getMatch(0); } if (inValidate(dllink, plugin)) { // xxxymovies.com dllink = br.getRegex("video_url\\s*:\\s*'((?:http|/)[^<>\"']*?)'").getMatch(0); } Code:
if (inValidate(dllink, plugin)) { // xxxymovies.com dllink = br.getRegex("video_url\\s*:\\s*'((?:http|/)[^<>\"']*?)'").getMatch(0); } if (inValidate(dllink, plugin)) { // HD javwhores dllink = br.getRegex("video_alt_url\\s*:\\s*\\'((?:http|/)[^<>\"]*?)\\'").getMatch(0); } In other words, I switched place of those two ifs and made it choose the last one. I guess it wasn't noticed that they had video_alt_url, video_alt_url2, video_alt_url3 etc. No edge cases of any kind tested. Maybe someone who actually knows how these plugins should look can fix it the real way or something. |
#2
|
||||
|
||||
Hi bolmarkskalle,
indeed you're right! Thanks for looking into it in the first place I've implemented it a bit differently than your attempt but it should do the job. Our KernelVideoSharing plugin handles a lot of different websites using the same script which is why it is important to pay attention when doing changes to make sure that it won't break the implementation of other websites running on the same codebase. Wartest du auf einen angekündigten Bugfix oder ein neues Feature? Updates werden nicht immer sofort bereitgestellt! Bitte lies unser Update FAQ! | Please read our Update FAQ! --- Are you waiting for recently announced changes to get released? Updates to not necessarily get released immediately! Bitte lies unser Update FAQ! | Please read our Update FAQ! -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|