JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 05.08.2020, 03:39
bolmarkskalle bolmarkskalle is offline
I will play nice!
 
Join Date: Jun 2019
Posts: 2
Default 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);
        }
Original

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.
Reply With Quote
  #2  
Old 05.08.2020, 13:41
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,088
Default

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
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 21:58.
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.