擅长:python、mysql、java
<p>它基本上获取<code>http://www.ows.newegg.com/Stores.egg/Menus</code>,并将其内容转储到一个字符串(<code>response</code>),然后使用<code>json.loads()</code>解析JSON并将其放入<code>data</code>。在</p>
<p>然后它将遍历数据的内容并使用<code>lxml</code>构建一个HTML列表。列表本身应该是:</p>
<pre><code><ul>
<li><a href="/Store?{StoreID}">{StoreTitle}</a></li>
...
</ul>
</code></pre>
<p>{和{cd7}中的id是<cd7}的。在</p>
<p><strong>参考文献:<a href="http://docs.python.org/library/urllib2.html" rel="nofollow">^{<cd8>}</a>,<a href="http://docs.python.org/library/json.html" rel="nofollow">^{<cd9>}</a>,<a href="http://lxml.de/index.html#documentation" rel="nofollow">^{<cd5>}</a></strong></p>