Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot get some kind of links parsing an HTML page with jsoup
    text
    copied!<p>Given this link:</p> <p><a href="http://www.argenteam.net/movie/40749/American.Reunion.%282012%29" rel="nofollow">http://www.argenteam.net/movie/40749/American.Reunion.%282012%29</a></p> <p>I'm trying to get all links like this on that page using jsoup:</p> <pre><code>&lt;a href="ed2k://|file|American.Reunion.UNRATED.DVDRip.XviD.CD1-COCAIN.avi|734205866|C92C5188830C4F740C69521F67337A45|h=Z5F72XEXRGGXBCMSOR6NS3IBCTFIHQLL|/"&gt;CD1&lt;/a&gt; </code></pre> <p>The problem is that I cannot get this kind of links. Doing some extreme thing I've tried the following code to get all the links on the page, but again, this "a[href]" is not present on the list.</p> <pre><code>doc = Jsoup.connect("http://www.******.net/movie/40749/American.Reunion.%282012%29").get(); Elements ed2k = doc.select("a[href]"); for (Element emule:ed2k){ String mula = emule.attr("href"); } </code></pre> <p>How can I get all links beginning with value "ed2k"? They're on the CSS "div.pmovie div.releases div.release-info div.section div.links div a" but I don't know what is the problem, they're "invisible" for my implementations. If you look into the source HTML code, it doesn't seem quirked and all browser can manage very well that kind of links. So, why I'm not reaching them parsing with jsoup and css selectors? Do I need to use Nodes and siblings?</p> <p>Thanks in advance.</p> <p><strong>Final edit with solution:</strong></p> <p>The website was requesting a cookie to show the links I needed, since that cookie is only generated using a real browser, Jsoup wasn't capable to retrieve all the information and it was connecting to a reduced version of the real page. Sending the specific cookie in the Jsoup connection solved the issue. Example:</p> <pre><code>doc = Jsoup.connect(your url here).cookie(cookie name, cookie value).get(); </code></pre>
 

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