14、爬虫标签的使用
<p>img[0]</p>
<pre><code><div class="spice-standard-image">
<a id="product_main_image_0"> <img alt="层压皮革小号肩背包" data-cloudzoom="https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_2400X2400.jpg" spice-data-image-src='{
"standard": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_800X800.jpg",
"standardRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_1200X1200.jpg",
"medium": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_360X360.jpg",
"mediumRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_720X720.jpg",
"small": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_490X490.jpg",
"smallRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_980X980.jpg"
}' src="https://res.gucci.cn/images/autoReplaceImageSrc/lazy-standard.png"/>
</a>
</div>
</code></pre>
<h3>提取里面的内容</h3>
<p>img[0].img["alt"]</p>
<pre><code>'层压皮革小号肩背包'
</code></pre>
<p>img[0].img["spice-data-image-src"]</p>
<pre><code>
'{\r\n\t\t\t\t\t\t\t\t\t\t\t"standard": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_800X800.jpg",\r\n\t\t\t\t\t\t\t\t\t\t\t"standardRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_1200X1200.jpg",\r\n\t\t\t\t\t\t\t\t\t\t\t"medium": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_360X360.jpg",\r\n\t\t\t\t\t\t\t\t\t\t\t"mediumRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_720X720.jpg",\r\n\t\t\t\t\t\t\t\t\t\t\t"small": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_490X490.jpg",\r\n\t\t\t\t\t\t\t\t\t\t\t"smallRetina": "https://res.gucci.cn/resources/2018/8/21/15347850013117477_g_980X980.jpg"\r\n\t\t\t\t\t\t\t\t\t\t}'</code></pre>