uBlockProtector icon indicating copy to clipboard operation
uBlockProtector copied to clipboard

wp.pl and related

Open xxcriticxx opened this issue 9 years ago • 75 comments

website again made couple changes @X01X012013 can you please check

xxcriticxx avatar Jan 24 '17 19:01 xxcriticxx

Thank you for your report, I will look into this when I have time.

jspenguin2017 avatar Jan 25 '17 04:01 jspenguin2017

thanks for help

xxcriticxx avatar Jan 25 '17 16:01 xxcriticxx

Test URL: http://opinie.wp.pl/andrzej-zupanski-ukradl-miliony-zostal-bohaterem-6083990028674177a http://www.money.pl/gospodarka/wiadomosci/artykul/marki-wlasne-biedronka-lidl-produkty-markowe,55,0,2241335.html

jspenguin2017 avatar Jan 25 '17 18:01 jspenguin2017

@X01X012013 did you release new ver of your software so i can test?

xxcriticxx avatar Jan 25 '17 20:01 xxcriticxx

Looks like they put the detector inside the video player. All the functions are closured, pretty well done. If someone figured out how to grab the link to the video file, please let me know. For now, I don't have more tricks in my bag. I'll have another look later when I have time.

jspenguin2017 avatar Jan 25 '17 20:01 jspenguin2017

@mikhoul or @szymon1118 any input on this?

xxcriticxx avatar Jan 26 '17 02:01 xxcriticxx

@X01X012013 Link to the video could be grabbed by splitting and trimming (formatting) what is inside <meta name="keywords" content=" more info here: http://wp.tv/jsapi/article_related.js . Then you can access playlist of videos eg. http://wp.tv/api/article_related.json?tags=marki+w%C5%82asne%3Bbiedronka%3Bsklep%3Bsie%C4%87%3Bproducenci+%C5%BCywno%C5%9Bci&domain=www.money.pl&type=default. Inside JSON you can get mid (probably movie id) and from this point there are two ways to grab video url (first link probably contains urls for whole playlist):

  • http://wp.tv/player/related.json?domain=www.money.pl&mid=1996701&type=video

  • http://wp.tv/player/mid,1996701,embed.json

szymon1118 avatar Jan 26 '17 11:01 szymon1118

but still we have to change the player with our own player?

xxcriticxx avatar Jan 26 '17 14:01 xxcriticxx

@xxcriticxx Yes, we would need to do that.

jspenguin2017 avatar Jan 26 '17 15:01 jspenguin2017

@szymon1118 I am able to grab the first JSON, but the url array is empty when I try to get "http://wp.tv/player/mid," + mid + ",embed.json". I noticed there are 30 elements in the first JSON, the first one has title matching the video player's title, is that the right one?

UPDATE: It looks like the method works for money.pl but not for wp.pl.

    if(Domain.endsWith("wp.pl") || Domain.endsWith("money.pl")){
        onEvent("load", function(){
            const tag = $("meta[name=keywords]").attr("content");
            $.get("http://wp.tv/api/article_related.json", {
                tags: tag,
                domain: Domain,
                type: "default"
            }, function(data){
                let mid;
                try{
                    mid = data.clips[0].mid;
                }
                catch(err){
                    console.error("AdBlock Protector failed to find media ID! ");
                }
                if(mid){
                    console.log("http://wp.tv/player/mid," + mid + ",embed.json");
                    $.get("http://wp.tv/player/mid," + mid + ",embed.json", function(data){console.log(data);});
                }
            });
        });
    }

jspenguin2017 avatar Jan 26 '17 16:01 jspenguin2017

Sadly I can't test the video from Canada.

mikhoul avatar Jan 26 '17 16:01 mikhoul

@X01X012013 I have changed your code from:

if(mid){
    console.log("http://wp.tv/player/mid," + mid + ",embed.json");
    $.get("http://wp.tv/player/mid," + mid + ",embed.json", function(data){console.log(data);});
}

to:

if(mid){
    console.log("http://wp.tv/player/mid," + mid + ",embed.json");
    $.get("http://wp.tv/player/mid," + mid + ",embed.json", function(data){
        window.open(data.clip.url[1].url, '_blank').focus();
    });
}

and for me it works for both money.pl and opinie.wp.pl websites so I don't really know where is the problem :smile:. Thanks for your help.

szymon1118 avatar Jan 26 '17 17:01 szymon1118

@szymon1118 Hi, that is not the issue there, url[1] is undefined for the first test link. I am able to get the first video of second test page working, working on others. image

jspenguin2017 avatar Jan 26 '17 18:01 jspenguin2017

Hi guys, I was able to make the first video of some pages working! Please have a look and submit links to pages where the first video is not working.

@szymon1118 Thanks for your help, I need clarification on something: article_related.json contains video in the correct order? So the first video is clip[0] and clip[1] for the second one? Why is there 30 items in the JSON? I bet there won't be 30 videos on the same page...

I am not able to get it to work on the first test URL, maybe it's Geo Lock?

jspenguin2017 avatar Jan 26 '17 18:01 jspenguin2017

@X01X012013 what player did you use? looks like you substituted the original player

@mikhoul i am in usa most stuff wont work but some will

paging @MajkiIT and @F4z to test

xxcriticxx avatar Jan 26 '17 18:01 xxcriticxx

@xxcriticxx The browser built-in player, like last time. One thing I need you guys to test is the correct video is loaded. I'm assuming clips array is in the correct order...

Things to test:

  • Is the first video working?
  • Is the correct video loaded?

Also, I need to know, how many video can be on the same page? Should I add a button on the page for "load next video"?

jspenguin2017 avatar Jan 26 '17 18:01 jspenguin2017

@X01X012013 what do we need script + list? or script only?

xxcriticxx avatar Jan 26 '17 20:01 xxcriticxx

here is page with multiple video's

http://wiadomosci.wp.pl/kat,1329,title,Austria-12-latek-czlonkiem-terrorystycznej-siatki-w-Wiedniu,wid,18685214,wiadomosc.html?ticaid=11883e

xxcriticxx avatar Jan 26 '17 20:01 xxcriticxx

at this page http://kobieta.wp.pl/najmodniejsze-fryzury-na-nadchodzacy-sezon-6084375065597057a correct video plays for second then freezes and new one starts

correct vid:

capture

new vid:

capture2

xxcriticxx avatar Jan 26 '17 20:01 xxcriticxx

@xxcriticxx Hi, both List and Script are updated. The new implementation is moved from List to Script.

For your reply above, what should be the correct video? Just a black screen?

jspenguin2017 avatar Jan 26 '17 23:01 jspenguin2017