你知道为什么这段代码会给我这些不同的结果吗?

问题描述

所以,我有一个用于亚马逊页面的抓取代码,但是当我想从图像中获取“src”属性时,它给了我奇怪的结果(基本上有时它给了我正确的 src,有时没有)。

我使用了这个代码

srcImage = scraperObject.find(id=idFrontimage)['src']
print(srcImage)

它给了我这个:

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABYWGBQYFBwaFhwYHBocIiceGBwgLjg0JzAlNiwsIjYsJTAlIzIsMDouNjA+TkBJPjpnUERYLkRHelJ8ZoZaUnYBDhoYGiAiGh4eIiIeICciRTAgHlIyNDgiSRQ4Hic2Jyk4HCcuMhwpPClJFj4eFFQ6RzIjRScgHiM2JxowNFY2Ov/AABEIAQoAwQMBIgACEQEDEQH/xACsAAACAwEBAQAAAAAAAAAAAAADBAACBQYBBxAAAgEDAgIGBAwFBQEBAQAAAQIDAAQREiEFMRMiM0FRcTJhgZIUFSNCUlNyc5GxstE0RFRIoUOCk6LBBtLhAQABBQEAAAAAAAAAAAAAAAAEAQIDBQYAEQABAwEFBQYFAwMBCQAAAAABAAIRAwQSITFBE1FhcYEiMlKRobEFYnLB8DNC4RTC0XMjJENTY4KistL/2gAMAwEAAhEDEQA/ANeTiuib4NY2pvLtdpABhEbkdbmgK/GYWeR0sb4Dt7WDGuKhXBuFVvhM8XDbEsSqw9vN4v5vSC/FSlCiX/Czytb48n+8rly6KDivBpYndzFCydrFkodik3vrm8B+LLeKCAenfXIATzQUu4vmZDc2FrxOT+VvItkP31BuNBlC8Vne8n/0uGWfoA+D1y5PJfXNmB8ZW8U8B9C+tgCvm4pybivBooldWimL9nFEoLmuS4bPftdsnDjHAMF3t2JMPMDk2qmoLm9K3c9nZ2FrJF20oU6h4iMElajL2CQSBET1OHnolWqz8ZmZJESxsVPYWs+Nc1MwcTtRIIOJWwsp/wC/sm9aPXIWzSXs5jeJLqeYEmed3yoHhoaijiV9Cr2d4IrqNGKFLjfSfemmNTpEls4gTGsll1U/E7YyGDhtsL2f+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UdJnkdn63LcY8KYEMTg6s4OxPrxpDURAIl0Beomcqd8dx3PKohSdrCINpYIgElXDMeqWOdlAbkTyAI7jXO3Q0yOuc6TpzW/PKLeHWSdZyLdG/X44xXNSHIpHkHAZBPosIBLsyvplSpUoNHLmpu3k+235mh10HRQncxxknckgVOhg+rj90VbCpgmFn3UMT2tVz9W1Gt7oYPq4/dFToYPq4/dFLtOCbsPm9Fg6jVa6DoYPq4/dFToYPq4/dFdtOC7YfN6Ln6ldB0MH1cfuip0MH1cfuiu2nBdsPm9Fz4OCCOYORU5nJ5866DoYPq4/dFToYPq4/dFdtOCXYfMufGxBGxG4NRiWOW3NdB0MH1cfuip0MH1cfuiu2nBdsfmXP1MkgKeS50iug6GD6uP3RU6GD6uP3RXbTgu2HzLn6ldB0MH1cfuip0MH1cfuiu2nBJsPm9FgA49fiKx7m3MBLploW/FfUa7foYPq4/dFeiGDkYo8HmNIqJ7g4ZciiKbSwyHSDmFy9hxl7VBDOOmt+Q+mo8FrbV+AXi/IzpbP7n+H6lNfArD+mtvcX9qqBox/prb3F/aggSMRgrYtBEEAhLvbcPj530LL3jUorOvLyxhwLcmaVBgOeVbAtLP+nt/cX9qsLOx/prb3F/anXnHMlMFNgyaAuFmmeVi8ramPf/AOCmbO2LETzDq840PefE12fwKx/prb3F/arGGHPZx+6KeyJkiY04qGrMXQYnM8EXJqULJqUIrBf/2Q==

那是错误的,或者,这个:

https://images-eu.ssl-images-amazon.com/images/I/519iCKXNl1L._SY264_BO1,204,203,200_QL40_ML2_.jpg

完全正确!!! 页面是一样的,它从一个运行变成另一个......

寻求帮助

解决方法

是的,有时亚马逊服务器会在 src= 属性中返回 URL,有时会返回 base64 编码的图像。但是您可以选择亚马逊存储纯 URL 的其他属性 ("data-a-dynamic-image"):

import json
import requests
from bs4 import BeautifulSoup


url = "https://www.amazon.it/Max90-storia-emozioni-decennio-fighissimo/dp/8820070421/ref=sr_1_1?dchild=1&qid=1618042585&s=books&sr=1-1"

headers = {
    "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0"
}

soup = BeautifulSoup(requests.get(url,headers=headers).content,"html.parser")
data = json.loads(soup.select_one("#imgBlkFront")["data-a-dynamic-image"])

# print image with highest resolution:
print(sorted(data.items(),key=lambda k: k[1],reverse=True)[0][0])

一直打印:

https://images-na.ssl-images-amazon.com/images/I/519iCKXNl1L._SX360_BO1,204,203,200_.jpg