Android Question okhttputils with delayed Javascript


Well-Known Member
Licensed User
Longtime User
Hello, I am trying to get direct extracted youtube link from this website, But the httputils completes before the page is fully loaded, so I am unable to get the link.

The Link comes behind a download button and it seems its loaded by a javascript

I need help in extracting the link.
<a title="video format: 720" class="link link-download subname ga_track_events download-icon" download="Sony WH-1000XM4 Review- The Final Form!.mp4" data-quality="720" data-type="mp4" href="https://r3---sn-h5q7rn7l.googlevide...title=Sony+WH-1000XM4+Review-+The+Final+Form!" data-ga-event="send;event;result;click;101">Download</a>

Sub btnGenerateLink_Click
    Dim modUrl As String  = ""
    Dim ok As HttpJob
    Wait For Jobdone(ok As HttpJob)
    If ok.Success Then
        Dim res As String
        res = ok.GetString       
    End If
End Sub



Licensed User
Longtime User
The problem is that HTTPjob will not run any javascript - so if the link is only generated at runtime in the page after some javascript has ran, then you can't use HTTPJob.

You can try to instead use a hidden webview (with javascript enabled and chromeclient added) and then extract and process the resulting HTML after webview loads the page.
Upvote 0