Nokogiri not parsing exported bookmark html from Delicious correctly
<p>I cannot seem to figure why Nokogori is not parsing this html file correctly. This html file is a bookmark export from Delicious. It has 400 links in it but always only parses out 254 links. I have other Delicious html export files that also only find 254 links (that have differing link amounts) and one that parses the links correctly (over 2000 links), so it seems as though there may be specific links that are causing the issue, but I'm really not sure. I'm linking to the html here, since the html puts the body of this post over the character limit. This is an example of the html (the actual html has over 400  tags):</p>

<pre><code>&lt;!DOCTYPE NETSCAPE-Bookmark-file-1&gt;
&lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"&gt;
&lt;!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! --&gt;
&lt;TITLE&gt;Bookmarks&lt;/TITLE&gt;
&lt;H1&gt;Bookmarks&lt;/H1&gt;
&lt;DL&gt;&lt;p&gt;
&lt;DT&gt;&lt;A HREF="http://www.lecartelclothing.com/" ADD_DATE="1459226337" PRIVATE="1" TAGS="montreal,art,design"&gt;Le Cartel | Le Cartel Clothing Inc.&lt;/A&gt;
&lt;DT&gt;&lt;A HREF="http://parkdaleprojectread.org/" ADD_DATE="1459226204" PRIVATE="1" TAGS="ngo"&gt;Parkdale Project Read&lt;/A&gt;
&lt;DT&gt;&lt;A HREF="http://darkmp3.ru/" ADD_DATE="1458608207" PRIVATE="1" TAGS="music,blogs,music_blog,download"&gt;Dark mp3&lt;/A&gt;
&lt;DT&gt;&lt;A HREF="http://www.sbs.com.au/programs/the-family-law/article/family-law-episode-guide" ADD_DATE="1458603937" PRIVATE="1" TAGS="asian,china,cinema"&gt;The Family Law: Watch the series | Programs&lt;/A&gt;
&lt;DT&gt;&lt;A HREF="http://asiansdoingeverything.tumblr.com/" ADD_DATE="1458602744" PRIVATE="1" TAGS="asian,blogs,china"&gt;Asians Doing Everything&lt;/A&gt;
&lt;/DL&gt;&lt;/p&gt;
</code></pre>

<p>I'm uploading the html file with the Carrierwave gem and parsing it. This code I've been using is (where html_upload is a model instance using Carrierwave):</p>

<pre><code>doc = Nokogiri::HTML.parse html_upload.file.read
puts doc.css('a').count
</code></pre>