How to get the direct url of a .mp4 video using C #?

I need some kind of algorithm that will extract the link from mp4engine.

Here is an example of the page I want to cancel.

The desired result in this case will be: http://mp4engine.com:182/d/a2chmyndcqqqgkpskitclvbgu5pgwxve2vmlrdsctpwbte2flb4i4hrz6/.hack_Roots (Dub) Episode 001-360p.mp4

I tried to use HtmlAgilityPackto get the player code, but it p,a,c,k,e,dand I cannot execute it in my C # Windows Phone 8.1 project. I was thinking about using Jurassic to run JS, but it does not work with WinPhone8.1

Here is the script I am using HAP:

<script type='text/javascript'>eval(function(p,a,c,k,e,d){while(c--    )if(k[c])p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c]);return p} ('15("14").13({f:"0://2.1:e/d/c/.b (a) 9 8- 7.6",12:"0://2.1/4/h.g",11:"0://2.1/i/10/z.y",x:"w",v:u,t:s,5:"0",r:"0://2.1/4/q /p",o:[{3:"n",m:"0://2.1/4/h.g"},{3:"l",k:{f:\'0://2.1:e/d/c/.b (a) 9 8- 7.6\',\'5\':\'0\'}},{3:"j"}],});',36,42,'http|com|mp4engine|type|player|provider|mp4|360p|001|Episode|Dub|hack_Roots|a2chmyndcqqgkpskitclvbgu5pgwxve2vmlrdsctpwbte2flb4i4hrz6||182|file|swf|jw6||download|config|html5|src|flash|modes|six|skins|skin|420|height|722|width|1484|duration|jpg|hahgl235zwv2|00000|image|flashplayer|setup|flvplayer|jwplayer'.split('|')))

I also tried using the built-in WebView control:

WebView wv = new WebView();
//... navigation to string and all that
var res = await wv.InvokeScriptAsync("eval", null);

Unfortunately, the function returns an empty string ( res = "")

base64, , , , .

, URL- ?

+4
2

<div id="player_code" ... <script> javascript, URL- . , :

jwplayer("flvplayer").setup({
    file: "http://mp4engine.com:182/d/a2chmyndcqqgkpskitclvbgu5pgwxve2vmlrdsctpwbsg7asjwghgk4p/.hack_Roots (Dub) Episode 001-360p.mp4",
    flashplayer: "http://mp4engine.com/player/jw6.swf",
    image: "http://mp4engine.com/i/00000/hahgl235zwv2.jpg",
    duration: "1484",
    width: 722,
    height: 420,
    provider: "http",
    skin: "http://mp4engine.com/player/skins/six",
    modes: [{
        type: "flash",
        src: "http://mp4engine.com/player/jw6.swf"
    }, {
        type: "html5",
        config: {
            file: 'http://mp4engine.com:182/d/a2chmyndcqqgkpskitclvbgu5pgwxve2vmlrdsctpwbsg7asjwghgk4p/.hack_Roots (Dub) Episode 001-360p.mp4',
            'provider': 'http'
        }
    }, {
        type: "download"
    }],
});

, file: URL- . , # HTML- , <script> <div id="player_code" ... , # , .

0

HtmlAgilityPack HTML, (javascript), .

:

1 - - javascript # ( : http://jsbeautifier.org/). , URL- , , .

2 - - .net, javascript, , Windows Form.

3 - javascript . . : # - PhantomJS ExecutePhantomJS

0

Source: https://habr.com/ru/post/1611620/


All Articles