Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Had to use HttpClient. no cookies required, just parsing for html:</p> <pre><code>private String getDownloadButtonOnly(String url){ HttpGet pageGet = new HttpGet(url); ResponseHandler&lt;String&gt; handler = new ResponseHandler&lt;String&gt;() { public String handleResponse(HttpResponse response) throws ClientProtocolException, IOException { HttpEntity entity = response.getEntity(); String html; if (entity != null) { html = EntityUtils.toString(entity); return html; } else { return null; } } }; pageHTML = null; try { while (pageHTML==null){ pageHTML = client.execute(pageGet, handler); } } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Pattern pattern = Pattern.compile("&lt;h2&gt;Direct Down.+?&lt;/h2&gt;(&lt;/div&gt;)*(.+?)&lt;.+?&gt;", Pattern.DOTALL); Matcher matcher = pattern.matcher(pageHTML); String displayHTML = null; while(matcher.find()){ displayHTML = matcher.group(); } return displayHTML; } @Override public void customizeWebView(final ServiceCommunicableActivity activity, final WebView webview, final SearchResult mRom) { mRom.setFileSize(getFileSize(mRom.getURLSuffix())); webview.getSettings().setJavaScriptEnabled(true); WebViewClient anchorWebViewClient = new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); String downloadButtonHTML = getDownloadButtonOnly(url); if(downloadButtonHTML!=null &amp;&amp; !url.equals(lastLoadedURL)){ lastLoadedURL = url; webview.loadDataWithBaseURL(url, downloadButtonHTML, null, "utf-8", url); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload