<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is free software; you can redistribute it and/or</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># modify it under the terms of the GNU General Public License</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># as published by the Free Software Foundation; either version 2 </tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># of the License, or (at your option) any later version.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is distributed in the hope that it will be useful,</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># GNU General Public License for more details. </tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You should have received a copy of the GNU General Public License</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># along with this program; if not, write to the Free Software</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-comment"># Citeseer provides two ways to search for documents: its own search</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># engine, and Google. This code use the first solution (as Google's</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># search API is not what it used to be...): first, all the links to</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># all the detailed citation pages are collected, then each page is</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># parsed, and the bibtex and abstract are extracted.</tt> </tt>
</div><div id="ResultScraper.count-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ResultScraper.count-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-docstring">"""Return the overall result count."""</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-comment"># the result count is immediately before the list of results,</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># unless we see no RIS comments, in which case there is no</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># result at all.</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-string">'no more than one search at a time per connection'</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-comment"># there are more links to process, launch a new</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-comment"># we are done once there is no pending link to fetch</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># and all the running fetchers have returned.</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-docstring">"""Handle a result page."""</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-comment"># initial pass, collect all the results, up to maxhits</tt> </tt>
Pyblio.Stores.bsddbstore.log" class="py-name" href="#" onclick="return doclink('link-102', 'log', 'link-17');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'this batch did not provide new links, stopping'</tt><tt class="py-op">)</tt> </tt>