<p>创建分布式爬虫python应用程序。它由一个主服务器和将在客户端服务器上运行的相关客户端应用程序组成。客户端应用程序的目的是在目标站点上运行,以提取特定的数据。客户机需要深入到站点内部,在多个级别的表单后面,因此每个客户机都是专门针对给定站点的。在</p>
<p>每个客户端应用程序看起来都像</p>
<pre><code>main:
parse initial url
call function level1 (data1)
function level1 (data)
parse the url, for data1
use the required xpath to get the dom elements
call the next function
call level2 (data)
function level2 (data2)
parse the url, for data2
use the required xpath to get the dom elements
call the next function
call level3
function level3 (dat3)
parse the url, for data3
use the required xpath to get the dom elements
call the next function
call level4
function level4 (data)
parse the url, for data4
use the required xpath to get the dom elements
at the final function..
--all the data output, and eventually returned to the server
--at this point the data has elements from each function...
</code></pre>
<p>我的问题:
如果
子函数受当前函数的影响而变化,我正在努力计算
找出最好的方法。在</p>
^{pr2}$
<p>我用python编写解析脚本。。在</p>
<p>所以。。。如有任何想法/意见,将不胜感激。。。在</p>
<p>我可以谈得更详细,但不想让任何人厌烦!!在</p>
<p>谢谢!在</p>
<p>汤姆</p>