Sign in to follow this  
Followers 0
jamesstp20

INetGet with this?

4 posts in this topic

Hello is there a way to do an iNetGet with this:

javascript:isIE=/*@cc_on!@*/false;isIE ? swfHTML=document.getElementById('movie_player').getElementsByTagName('param')[1].value:swfHTML=document.getElementById("movie_player").getAttribute("flashvars");w=swfHTML.split("&"); for(i=0;i<=w.length-1;i++) if(w[i].split("=")[0] == "fmt_url_map"){links=unescape(w[i].split("=")[1]);break;}abc = links.split(",");for(i=0;i<=abc.length-1;i++){fmt=abc[i].split("|")[0];if(fmt==18){url = abc[i].split("|")[1];window.location.href = url;}}

Instruction:

Go for exemple here:

and after go to :

javascript:isIE=/*@cc_on!@*/false;isIE ? swfHTML=document.getElementById('movie_player').getElementsByTagName('param')[1].value:swfHTML=document.getElementById("movie_player").getAttribute("flashvars");w=swfHTML.split("&"); for(i=0;i<=w.length-1;i++) if(w[i].split("=")[0] == "fmt_url_map"){links=unescape(w[i].split("=")[1]);break;}abc = links.split(",");for(i=0;i<=abc.length-1;i++){fmt=abc[i].split("|")[0];if(fmt==18){url = abc[i].split("|")[1];window.location.href = url;}}

Thanks ;)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Javascript is active not just an adress

You must navigate to youtube adress and use javascript after to get video download of first page ! Posted Image

see my script in details of my TinyYoutubeDownloader...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Yes but your tiny youtube downloader is not really easy to understand. You really made it harder to understand :S

Please someone ?

Share this post


Link to post
Share on other sites

Yes but your tiny youtube downloader is not really easy to understand. You really made it harder to understand :S

Please someone ?

Try the heart of the script and you'll understand ! Posted Image

#Include <Array.au3>
#include <IE.au3>

$_YoutubeUrl='http://www.youtube.com/watch?v=qrO4YZeyl0I'

    Local $_JScriptCmd1 ="javascript:fv=document.getElementById('watch-headline-title').innerText;"
    Local $_JScriptCmd2 ="javascript:isIE=/*@cc_on!@*/false;isIE ? swfHTML=document.getElementById('movie_player')" & _
    ".getElementsByTagName('param')[1].value:swfHTML=document.getElementById('movie_player').getAttribute('flashvars');" & _
    "w=swfHTML.split('&');for(i=0;i<=w.length-1;i++) if(w[i].split('=')[0]=='fmt_url_map') {links=unescape(w[i].split('=')[1]);}"
    $oIE = ObjCreate ( "InternetExplorer.Application" ) 
    $oIE.Visible = 0
    $oIE.Left = 0     
    $oIE.Top = 0      
    $oIE.Width = @DesktopWidth /3
    $oIE.Height = @DesktopHeight /3
    $oIE.Menubar = 1 ; for use _IEAction ( $oIE, "back" )      
    $oIE.Toolbar = 0
    $oIE.Statusbar = 0
    $oIE.Resizable = 0      
    $oIE.Navigate ( $_YoutubeUrl )
    _WaitWhileIEBusy ( ) 
    Sleep ( 500 )
    $oIE.Navigate ( $_JScriptCmd1 ) 
    _WaitWhileIEBusy ( ) 
    $_VideoTitle =  _IEBodyReadText ( $oIE ) ; _CleanVideoName ( _IEBodyReadText ( $oIE ) ) 
    If StringLen ( $_VideoTitle ) > 50 Or StringInStr ( $_VideoTitle, 'incorrect' ) <> 0 Then 
        MsgBox ( 0, 'Error', 'Download Urls Not Found', 3 )
        ;_EnableAllButtons ( ) 
        ;_GUICtrlStatusBar_SetText ( $_StatusBar, "" , 0 )
        ;$oIE.Quit 
        ;_CloseWindowWithString ( '' )
        ;Return
    EndIf       
    _IEAction ( $oIE, "back" )
    _WaitWhileIEBusy ( ) 
    $oIE.Navigate ( $_JScriptCmd2 ) 
    _WaitWhileIEBusy ( ) 
    Sleep ( 1000 )  
    $_VideoLinks = _IEBodyReadText ( $oIE ) 
    $_UrlArray = StringSplit ( $_VideoLinks, ',' )
    ;$oIE.Quit 

ConsoleWrite ( "$_VideoTitle : " & $_VideoTitle & @Crlf )
_ArrayDisplay ( $_UrlArray, '$_UrlArray' )

Func _WaitWhileIEBusy ( ) 
    Do 
        Sleep ( 100 )
    Until Not $oIE.Busy 
EndFunc ;==> _WaitWhileIEBusy ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0