I have an android app that retrieves and downloads audio from the web.
What I did so far is to get the download link shown on WebView
using webview.loadUrl("some javascript code")
.
What I want to do is get the href attribute of the download link and store it as a String
.
But I have two problems:
First, there are several anchor tags with no id or class that are all under the div with id "dl_links". All those anchor tags have an href attribute but all of them except the correct download link have display:none
. I have no idea how to select this without using jQuery.
Secondly, since the download link is loaded with JavaScript, the url of the website before and after the showing the download link are the same. At first I was planning to use jsoup to pull out the href attribute that I needed but since the url after loading the webpage is the same, I'm not sure how to do that.